Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2325
creating cell button programmatically
posted

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.

Parents
No Data
Reply
  • 69832
    Verified Answer
    Offline posted

    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.

Children