Sometimes we need to get the value out of the invisible column. We make the column invisible because it contains confidential information. You can easily get the value out of the column of the datagrid which is not showing.
Using property builder add Bound column and in the column which you want to make it invisible leave the visible checkbox and the readonly checkbox uncheck.
Now this is a small snippet that you need to write in the delete_itemcommand event handler.
private void DataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
string item = e.Item.Cells[0].Text;
Label1.Text = item;
}
No comments:
Post a Comment