Groups | Blog | Home
all groups > asp.net datagrid control > july 2005 >

asp.net datagrid control : Creation and Positioning DataGrid Columns at runtime.


Eliyahu Goldin
7/27/2005 12:00:00 AM
Alan,

What happens if you just change the order of the columns in the .aspx file?

Eliyahu

[quoted text, click to view]

Alan Seunarayan
7/27/2005 12:00:00 AM
in the ItemDataBound event of a DataGrid add the following....

TableCell deleteCell = e.Item.Cells[1]; // rendered ButtonColumn

e.Item.Cells.Add(deleteCell);



[quoted text, click to view]

Eliyahu Goldin
7/27/2005 12:00:00 AM
Are you creating column dynamically? What happens if you change the column
creating order?

Eliyahu

[quoted text, click to view]

John Teague
7/27/2005 5:59:03 AM
Post the code where you are creating the columns

[quoted text, click to view]
Alan Seunarayan
7/27/2005 9:03:22 AM
Hello,
I need to create a DataGrid that looks something like this...

<HyperLinkColumn><ButtonColumn><Data><Data><ButtonColumn>

but I can only seem to produce a DataGrid as below...

<HyperLinkColumn><ButtonColumn><ButtonColumn><Data><Data>

Can anyone help?
Many thanks in advance.

Alan

Alan Seunarayan
7/27/2005 9:52:30 AM
it needs to be done in the 'Code-Behind'.

[quoted text, click to view]

AddThis Social Bookmark Button