A
Angel Fernendez
I am using a run-time connection to populate a datagrid and when I try to
hide my columns it does not work. If I set the column index higher I get an
error.
here is the code
cn.Open();
SqlCommand cmd = new SqlCommand(sSQL,cn);
DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
DataGrid1.DataSource = dt;
DataGrid1.DataBind();
this.DataGrid1.Columns[1].Visible = false;
does anyone have any suggestions?
Please help!!
Thanks!!
hide my columns it does not work. If I set the column index higher I get an
error.
here is the code
cn.Open();
SqlCommand cmd = new SqlCommand(sSQL,cn);
DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
DataGrid1.DataSource = dt;
DataGrid1.DataBind();
this.DataGrid1.Columns[1].Visible = false;
does anyone have any suggestions?
Please help!!
Thanks!!