P
Priya via .NET 247
I am creating an small application to display data from a SQL back end using a stored procedure.
DataGrid1.DataSource = MyService.viewTable();
DataGrid1.DataBind();
I set the property so as not to display a particular Column
DataGrid1.Columns[1].Visible = !DataGrid1.Columns[1].Visible;
It gave me an array out of bound exception. So I displayed the value of the columns and it shows 0. This statement to display the columns is after DataBind. But if just view the table and not make any changes it displays the table.
Could any one tell me what I am doing wrong.
Thanks,
Priya
DataGrid1.DataSource = MyService.viewTable();
DataGrid1.DataBind();
I set the property so as not to display a particular Column
DataGrid1.Columns[1].Visible = !DataGrid1.Columns[1].Visible;
It gave me an array out of bound exception. So I displayed the value of the columns and it shows 0. This statement to display the columns is after DataBind. But if just view the table and not make any changes it displays the table.
Could any one tell me what I am doing wrong.
Thanks,
Priya