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
680
A column that sometimes displays a checkbox, sometimes not?
posted

Hello,

I have a UltraWinGrid where I want to display different features that can be bought in my application. For some of these features it is possible for the user to get a trial version. I want to represent this by having an unbound column in the grid with checkboxes. Checking it means that the user wants to try the feature, not checking it means that the user wants to wait with trying out the feature. In the cases where no trial is possible I don't want to display a checkbox at all. To many checkboxes clutters up my gui. And this is my question. Is it possible for me to add an unbound column to a UltraWinGrid where I display a checkable checkbox based upon a boolean in my datasource?

Regards, Johan 

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    johancarlsson said:
    Is it possible for me to add an unbound column to a UltraWinGrid where I display a checkable checkbox based upon a boolean in my datasource?

    Yes, you can handle InitializeLayout and add members to the e.Layout.Bands[x].Columns collection. There is no one-touch setting that will tell each row whether to use a checkbox for a particular cell, but the UltraGridCell class exposes an Editor property, so you can assign different editors on a per-cell basis. In your case, you could make the unbound column's type boolean if the majority of them will display a checkbox, and then set the Editor property of the cells that should not display a checkbox to (for example) an Infragistics.Win.EditorWithText.

Children