Note that there are some explanatory texts on larger screens.

plurals
  1. POGridView/ObjectDataSource inside runat=server container does not bind
    text
    copied!<p>I've got a small web form with 2 radio buttons, call them PickFromList and EnterValue. When PickFromList is checked I want to show a GridView that I've configured to bind to an ObjectDataSource. When EnterValue is checked I want the GridView to disappear.</p> <p>This form is laid out using a table and want to hide/show the appropriate rows based on appropriate data and user input. </p> <p>Unfortunately the GridView doesn't bind when the trPickFromList2 row specifies the id and the runat="server" attributes. If I remove id and runat="server" from the trPickFromList2 row it binds successfully.</p> <p>Any ideas?</p> <pre><code>&lt;table id="tblOptions" runat="server"&gt; &lt;tr id="trPickFromList1" runat="server"&gt; &lt;td&gt; &lt;asp:RadioButton ID="rbFromList" runat="server" GroupName="Selection" Text="Get Data From Existing Item" AutoPostBack="True" oncheckedchanged="rbromList_CheckedChanged" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr id="trPickFromList2" runat="server"&gt; &lt;td style="padding-left:20px"&gt; &lt;asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" DataSourceID="odsList" Width="400px" onrowdatabound="gvList_RowDataBound"&gt; &lt;Columns&gt; ... &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr id="trEnterValue1" runat="server"&gt; &lt;td&gt; &lt;asp:RadioButton ID="rbEnterValue" runat="server" GroupName="Selection" Text="Create a New Item" AutoPostBack="True" oncheckedchanged="rbEntered_CheckedChanged" /&gt; ... </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload