For
lblcolumn
, you have bound "column" data in Markup like...
<asp:label id="lblcolumn" width="20px" runat="server" forecolor="Black" text="<%# Eval("column") %>" xmlns:asp="#unknown"></asp:label>
Again, inside the
GridCustomColumn_RowDataBound
, you are changing its value.
So, when
GridCustomColumn_RowDeleting
is fired, it rebinds the Grid if the below is satisfied.
if (((DataTable)ViewState["columnreport"]).Rows.Count > 0)
So, it goes to
GridCustomColumn_RowDataBound
Event and changes the value of lblcomumn as 1, 2, 3 etc...
But Markup again changes the value to the
ViewState
column data. That's why you see different data.
So, I think, if you delete the column binding from the Mark up, it will be fine. Try once.
<asp:label id="lblcolumn" width="20px" runat="server" forecolor="Black" xmlns:asp="#unknown">Text='<%# Eval("column") %>'></asp:label>