SG
Sean Greer
November 13, 2003 10:56 PM UTC
> How do I add a pushButton CellType in a GridDataBoundGrid?
>
> The documentation only show how to do this for a grid control, which does not work on the GridDataBoundGrid.
>
> thanks
>
Susie,
I have no problem adding a PushButton cell type to a GDBG. Here is the code that I use:
GridBoundColumn gbc = new GridBoundColumn();
gbc.StyleInfo.CellType = "PushButton";
gbc.StyleInfo.Description = "...";
gbc.HeaderText = "Edit";
m_sdgAccountGrid.GridBoundColumns.Add(gbc);
// ... add others that are mapped
Note that this is done prior to setting the DataSource property of the grid.
HTH,
Sean