Author: phani cool | Posted on: 5/6/2009 4:02:53 AM | Views : 272

Hi all,

                i have a datagrid.. i am binding the grid with a datatable. I want to display the grid with fixed columns.

i tried the following code.

GridView2.DataSource = newdt;

GridView2.DataBind();

for (int i = 0; i <= GridView2.Columns.Count; i++)

{

 GridView2.Columns[i].ItemStyle.Width = 91;

}

but at the for loop, its always counting the number of columns as 0. So can u pls suggest me the solution for this...

 

Thankq...

  Go to the complete details ...