Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I just set up a very basic example with no problems. Without posting code (as many others have asked for) there isn't much we can help you with.</p> <p>Here is the code from my example - nothing tricky here, just bound a string array to a repeater, and bound the gridview to a sqldatasource with the select and delete commands specified.</p> <p>All I can think is that your datasource doesn't have the delete command / method specified (but you'd get a clear error about this), or that you don't have the DataKeyNames specified in the gridview (but you'd get a clear error about that as well).</p> <pre><code>&lt;asp:Repeater ID="rp" runat="server"&gt; &lt;ItemTemplate&gt; &lt;p&gt;Row: &lt;%#Container.DataItem%&gt;&lt;/p&gt; &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="CroppingID"&gt; &lt;Columns&gt; &lt;asp:CommandField ShowDeleteButton="True" /&gt; &lt;asp:BoundField DataField="CroppingID" HeaderText="CroppingID" ReadOnly="True" SortExpression="CroppingID" /&gt; &lt;asp:BoundField DataField="CroppingName" HeaderText="CroppingName" SortExpression="CroppingName" /&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;/ItemTemplate&gt; &lt;/asp:Repeater&gt; </code></pre> <p>and the datasource (from an existing database I have set up)</p> <pre><code>&lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="&lt;%$ ConnectionStrings:sConn %&gt;" DeleteCommand="spD_Cropping" DeleteCommandType="StoredProcedure" SelectCommand="spS_Croppings" SelectCommandType="StoredProcedure"&gt; &lt;DeleteParameters&gt; &lt;asp:Parameter Name="CroppingID" Type="Byte" /&gt; &lt;/DeleteParameters&gt; &lt;/asp:SqlDataSource&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