R
ree32
I am using a a datagrid to display results from a dataset.
I have a button on each row of the grid, so when the user clicks on
it, it displays more information from the the dataset which is not
initially shown in the datagrid.
But I have a problem as I don't know how to access the "hidden" column
data using the column names. I have seen where the numbers of cells
are used ..
i.e .. e.Item.Cells(2).Text
Is the number refering to the dataset or column layout on the datagrid
itself?
But I don't want use cell numbers as if I add another column in the
database, wouldn't all the numbering of cells be thrown off?
In datalists you can use e.Item.DataItem("ColumnName")
is there any equivalent for Datagrids ?
Or should I just stick to datalists?
Or do I have this feeling I have to include all columns I want to use
on the aspx page and then somehow make some columns hidden?
I have a button on each row of the grid, so when the user clicks on
it, it displays more information from the the dataset which is not
initially shown in the datagrid.
But I have a problem as I don't know how to access the "hidden" column
data using the column names. I have seen where the numbers of cells
are used ..
i.e .. e.Item.Cells(2).Text
Is the number refering to the dataset or column layout on the datagrid
itself?
But I don't want use cell numbers as if I add another column in the
database, wouldn't all the numbering of cells be thrown off?
In datalists you can use e.Item.DataItem("ColumnName")
is there any equivalent for Datagrids ?
Or should I just stick to datalists?
Or do I have this feeling I have to include all columns I want to use
on the aspx page and then somehow make some columns hidden?