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
230
Set all items initially checked
posted

I have an ultraCombo on my form displaying items from a datasource.  I have added a checkbox column, and it works properly.  I can see items and check them.

Now I want all the items in the list to be checked initially.  How do I programmatically or declaritively tell the control that all items in the list are checked initially?

Another small item:  if all the items in the list are checked, I want the .Text property to display "<All>" instead of showing the individual items in the text portion of the control.  Is this possible?

Thanks for any advice.

  • 469350
    Suggested Answer
    Offline posted

    The checked state of each checkbox comes from the value of the cell.

    So you could loop through the rows in the UltraCombo and set the Value on each checkbox cell in each row to true.

    Or, you could set the Value on the control to an array containing all of the values in the your ValueMember column.