Note that there are some explanatory texts on larger screens.

plurals
  1. PO'DataSource' property cannot be set declaratively
    primarykey
    data
    text
    <p>I'm having a bit of difficulty trying to find a more clear solution than what Google has yielded for this problem. I have the following code that is throwing this error but the solutions I've found say, "Have you tried the DataSourceID instead of DataSource?" with no indication as to what should be used for the DataSourceID value.</p> <pre><code>...leading code left out for brevity's sake &lt;Columns&gt; &lt;asp:BoundColumn DataField="id" SortExpression="id" HeaderText="ID" ItemStyle-CssClass="dgCells"&gt;&lt;/asp:BoundColumn&gt; &lt;asp:BoundColumn DataField="first_name" SortExpression="first_name" HeaderText="First" ItemStyle-CssClass="dgCells"&gt;&lt;/asp:BoundColumn&gt; &lt;asp:BoundColumn DataField="last_name" SortExpression="last_name" HeaderText="Last" ItemStyle-CssClass="dgCells"&gt;&lt;/asp:BoundColumn&gt; &lt;asp:BoundColumn DataField="login_pw" HeaderText="Password" ItemStyle-CssClass="dgCells"&gt;&lt;/asp:BoundColumn&gt; &lt;asp:TemplateColumn HeaderText="Race"&gt; &lt;ItemTemplate&gt; &lt;%# DataBinder.Eval(Container.DataItem, "race_name") %&gt; &lt;/ItemTemplate&gt; &lt;EditItemTemplate&gt; &lt;asp:DropDownList runat="server" id="ddlRaces" DataValueField="race_id" DataTextField="race_name" &gt;&gt;&gt;DataSourceID=""&lt;&lt;&lt; /&gt; &lt;/EditItemTemplate&gt; &lt;/asp:TemplateColumn&gt; &lt;asp:EditCommandColumn EditText="Edit" CancelText="Cancel" UpdateText="Ok"&gt;&lt;/asp:EditCommandColumn&gt; &lt;/Columns&gt; ...trailing code left out for brevity's sake </code></pre> <p>So, I come to you all to ask what I should be inserting into the DataSourceID="" value. Please be verbose as I am still getting my feet wet with some of this stuff.</p> <p>Thanks. :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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