Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is nothing to do much, do you want to display it(link button for all the rows? if yes then try the following code)</p> <pre><code>&lt;table cellpadding="0" cellspacing="0"&gt; &lt;tr valign="top" class="list_heading"&gt; &lt;td width="25%"&gt; Column &lt;/td&gt; &lt;td width="25%"&gt; Operation &lt;/td&gt; &lt;td width="19%" style="display: none;"&gt; And/Or &lt;/td&gt; &lt;td width="25%"&gt; Value &lt;/td&gt; &lt;td width="06%"&gt; Remove &lt;/td&gt; &lt;/tr&gt; &lt;tbody&gt; &lt;asp:Repeater ID="rpSearchItems" runat="server"&gt; &lt;ItemTemplate&gt; &lt;tr&gt; &lt;td style="display: none;"&gt; &lt;/td&gt; &lt;td&gt; &lt;%# Eval("ColumnName") %&gt; &lt;/td&gt; &lt;td&gt; &lt;%# Eval("Operation") %&gt; &lt;/td&gt; &lt;td style="display: none;"&gt; &lt;%# Eval("AndOr") %&gt; &lt;/td&gt; &lt;td&gt; &lt;%# Eval("Value") %&gt; &lt;/td&gt; &lt;td align="center"&gt; &lt;asp:ImageButton ID="ibtnRemoveSearchItem" ImageUrl="~/Controls/ImagesForSearch/Remove.png" CommandArgument=' &lt;%# Eval("Id") %&gt;' CssClass="RemoveUitem" ToolTip="Remove Item" runat="server" OnClick="ibtnRemoveSearchItem_Click" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/ItemTemplate&gt; &lt;/asp:Repeater&gt; &lt;/tbody&gt; &lt;tr valign="top" class="list_bottom"&gt; &lt;td colspan="6"&gt; &amp;nbsp; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>And in code behind code you can go like this:</p> <pre><code>Protected Sub ibtnRemoveSearchItem_Click(sender As Object, e As EventArgs) ImageButton ibtnRemoveSearchItem = (ImageButton)sender; Int32 Id = Convert.ToInt32(ibtnRemoveSearchItem.CommandArgument); //Using the above two lines you can get the Coomand Argument, pass it to you delete stored proc thats all // do your stuff here End Sub </code></pre> <p>hope this will help you </p> <p><strong>UPDATE :</strong> If you want to add it conditionally then you can do it from "<strong>OnItemDataBound</strong>" event of repeater</p> <p>for much info <a href="http://www.codeproject.com/Articles/438259/Insert-Update-Search-and-Delete-CRUD-operation-usi" rel="nofollow">review this</a></p> <p><a href="http://www.c-sharpcorner.com/uploadfile/kannagoud/edit-update-delete-record-in-repeater-control/" rel="nofollow">This one also can help you</a></p>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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