S
sivagururaja
Hi All,
How can i bound the column in the gridview dynamically.
When i tried to bound the column using the Code behind, it won't work.
Here is my code.
BoundColumn bc = new BoundColumn();
bc.HeaderText = "Names";
bc.DataField = "Name";
GridView1.Columns.Add(bc);
What's the mistake i made in this?
My problem is, I maintain the two type of Users in my page.
One is normal users and another one is Power user.
When the normal users are loged on only the columns i mentioned as per
the ASP page will be bound. This work's fine.
On the other hand, when the Power user will logged on it will bound
the columns via the code behind.
Regards,
Raja.
How can i bound the column in the gridview dynamically.
When i tried to bound the column using the Code behind, it won't work.
Here is my code.
BoundColumn bc = new BoundColumn();
bc.HeaderText = "Names";
bc.DataField = "Name";
GridView1.Columns.Add(bc);
What's the mistake i made in this?
My problem is, I maintain the two type of Users in my page.
One is normal users and another one is Power user.
When the normal users are loged on only the columns i mentioned as per
the ASP page will be bound. This work's fine.
On the other hand, when the Power user will logged on it will bound
the columns via the code behind.
Regards,
Raja.