E
eg
I have a datagrid, I populate with a datatable that is created and
populated at runtime, with C# code. I have a clear button on my web
form that I use to clear all the text box controls with. I also used
the code below to clear the rows in the datagrid, but after the form
does a postback the rows, with no data, are displayed again, in the
datagrid. How do I remove the rows from the datagrid?
Thanks
for (int I = 0; I < grdSW.Items.Count; I++)
{
DataGridItem lItem = grdSW.Items;
lItem.Cells.Clear();
}
grdSW.DataSource = null;
populated at runtime, with C# code. I have a clear button on my web
form that I use to clear all the text box controls with. I also used
the code below to clear the rows in the datagrid, but after the form
does a postback the rows, with no data, are displayed again, in the
datagrid. How do I remove the rows from the datagrid?
Thanks
for (int I = 0; I < grdSW.Items.Count; I++)
{
DataGridItem lItem = grdSW.Items;
lItem.Cells.Clear();
}
grdSW.DataSource = null;