Note that there are some explanatory texts on larger screens.

plurals
  1. POdeleting a row with Objectdatasource and gridview
    text
    copied!<p>I'm using Gridview with objectdatasource, I've selected select and delete method for objectdatasource, but i don't know how to set delete parameter (id) for objectdatasource. here is my code:</p> <pre><code>&lt;apc:GridView ID="GridView1" runat="server" ApproveText="APPROVE" AutoGenerateColumns="False" CancelText="Canecl" CheckAllText="CHECK All" DataSourceID="ObjectDataSource1" DeleteAllText="Delete Selected Rows" DeleteButtonImageUrl="css/layout/site/tables/action4.gif" DeleteText="Delete" EditText="Edit" NewText="ADD NEW" SelectButtonImageUrl="css/layout/site/tables/action1.gif" SelectText="Select" ShowCheckBox="True" ShowDeleteAllButton="True" ShowDeleteButton="True" ShowEditButton="True" ShowNewButton="False" ShowSelectButton="True" Title="Table Template" UnCheckAllText="UNCHECK All" UpdateText="Update" DataKeyNames="Id" &gt; &lt;Columns&gt; &lt;asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" /&gt; &lt;asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" /&gt; &lt;asp:BoundField DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" /&gt; &lt;asp:BoundField DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber" /&gt; &lt;asp:BoundField DataField="MobileNumber" HeaderText="MobileNumber" SortExpression="MobileNumber" /&gt; &lt;asp:BoundField DataField="CompanyPhone" HeaderText="CompanyPhone" SortExpression="CompanyPhone" /&gt; &lt;asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" /&gt; &lt;/Columns&gt; </code></pre> <p> </p> <p>i get ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Delete' that has parameters: id, original_Id. please help me. tanks.</p>
 

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