Im using 13.1 controls.... I need to create a cell button programmatically. I have seen an example of an ultragrid that had a cell with cell button, but those were done via designer. I need to do this dynamically based on conditions to either put in a button or not. So I have to code this programmatically without the designer. (We don't use the designer at all for configuring our grids...)
How do I do this? Do I just add a cellbuttonappearance object to cellbuttonappearance? Not really clear on this. Plus just adding cellbuttonappearance object does not seem to work.
I figured it out ColumnStyle.EditButton;...
ahhh excellent... that makes the whole cell a button... what if you don't want the whole cell as a button?
+-------------------------------------------------+
| <cell> | btn |
The UltraGridColumn and UltraGridCell classes both expose a property named 'Style'; one of the constants defined in the associated enumeration is named 'Button', so you can assign that value at the column level to affect all cells in that column, or on the cell level to set it only on a particular cell.
Note that when a cell button is clicked, the grid raises the ClickCellButton event.