Skip to content

Replies

0
Fred
Fred answered on Sep 14, 2017 7:27 AM

Yeah, that's what I figured out. I got it all working now, so again, thanks a lot for your help!

0
Fred
Fred answered on Sep 13, 2017 4:35 PM

Hello Mike,

Looping through the cells and determining the desired value of the checkbox wasn't the problem… that part was indeed clear.

My issue was with determining the correct 'column' as base for the .SetHeaderCheckState function call. I kept ending up with a value that updated the checkbox on the parent row, instead of on the groupby row. But it looks like I have figured it out…  in BeforeRowExpanded, as the e.Row is a groupby row (UltraGridGroupByRow), I can loop through it's .Rows collection to get to the data rows… and I'll just take the first Cells('checkbox').Column from there. That does indeed allow me to update the correct (groupby) checkbox.

So it looks like everything works as intended now. Thanks a lot for all your help!

0
Fred
Fred answered on Sep 13, 2017 1:16 PM

Thank you very much for your help. That helped a lot, and I'm making a lot of progress.

Clicking on a data row checkbox will now correctly update the associated groupby checkbox, and vice versa.

I only have 1 situation that doesn't work yet:

When I initially open the screen and click on the groupby row to expand it, then I need to initialize the groupby header checkbox (checked/unchecked/indeterminate) based on the current state of all the associated data row checkboxes. What would be the correct place to do this? I've been looking at the InitializeRow, BeforeRowExpanded and AfterRowExpanded events, but I don't see how I can change the value of the groupby row's checkbox from there.

0
Fred
Fred answered on Sep 11, 2017 12:30 PM

Thanks for the update. So it's not possible to keep the CheckBoxSynchronization to None and to manually update the checkbox in the GroupBy header from inside the code?

0
Fred
Fred answered on Sep 7, 2017 4:21 PM

Thanks Mike! This solved at least part of my problem. You were right with (1), I was indeed using the grid. I changed the rows collection, and now my BeforeHeaderCheckStateChanged event works as intended… it only updates the checkboxes on the rows that are in the group. Excellent.

But I think I'm still overlooking something with (2). How do I update the checkbox in the GroupBy header from there?
I did find e.Cell.Row.ParentCollection.Band.Columns({key}).SetHeaderCheckState(), but that doesn't seem to be it, as I see nothing happening.

0
Fred
Fred answered on Sep 7, 2017 2:43 PM

No updates yet?