Datagrid puzzler

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the following code for a datagrid:

DataView dv = CreateAppPermissionDataSource();
for (int i = 0; i < dv.Count; i++)
{
if (dv.Row[6].ToString() == "0")
{
dv.Row[0] = "NO";
}

}

I get an error that says cannot find column 6. But column 6 is definitely
there as the following line of codes shows:

applicationPermissionGrid.Columns.AddAt(6, optvalue);

What do I need to change to make this work.

Thanks,

Dave
 
Verify that the column got added correctly. Do a

dv.columns.count

I think if you try an addat X but there is no X-1, it will not go to X.

Chris
 
Back
Top