I have a delete button by createing <asp:ImageButton>. first row user cant delete the item so I dont want a delete button on first row? how can i do this?
<asp:DataList ID="DataList1" runat="server" DataKeyField="ID" OnDeleteCommand="DeleteCommand" RepeatColumns="2" RepeatLayout="Table" RepeatDirection="Horizontal">
<ItemTemplate>
<asp:ImageButton runat="server" ID="deleteIB" CommandName="Delete" ImageUrl="x-icon.png" />
<%# DataBinder.Eval(Container.DataItem, "PRINT") %>
</ItemTemplate>
</asp:DataList>
Protected Sub BindGridData()
Dim dt As DataTable = New DataTable()
dt.Columns.Add(New DataColumn("ID", GetType(Int32)))
dt.Columns.Add(New DataColumn("PRINT", GetType(String)))
Dim dr As DataRow
...
While reader.Read()
dr = dt.NewRow()
dr(0) = reader(0)
dr(1) = "<a href=''>[x]</a> reader(1)"
dt.Rows.Add(dr)
End While
...
End Sub