Hi,
I'm using 2006 vol 3. In online help center I found an article about how to add checkbox to a header http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=4883.
In my particular case I deal with days of week. Each day has activites. So I have 7 root rows (days) with some child rows (activities). User needs to be able to select activities individualy. I used technic from that article to add checkbox to a header of activites. My improvement was done for keeping checkstate of header checkbox synchonized with child row chechbox states. Obviously header checkbox is tri-state checkbox.
The problem folowing. I can't set state of header checkbox from one day without touching other ones. In example: if I set CHECKED state for checkbox of Monday's activities it affects all other day (Tu-Su).
Could you advise, please.
I'm having a hard time following what you are trying to do or what the problem is. Can you post some screen shots and explain the issue in more detail?
It sounds like you are modifying the sample, but something you are doing in your code is incorrect and you are not accounting for child rows correctly. But it's impossible to help you with that without seeing what your code is doing.
By the way... are you aware that the latest version of the grid has built-in support for checkboxes in column headers so you no longer need to use a CreationFilter for this?
Hi Mike.
Sorry for being tough in explaining. I should've done this little screenshot initially. Hope now it will be easier to understand the problem.
I don't think I have some mistakes in my code. Sample behaves the same without any modifications.
And thanks for the info about the latest version. We were thinking about that as we need some other new feature in the ultraDayView. Now we have one more reason to buy it.
The sample you are talking about is using a CreationFilter to add a CheckBoxUIElement to the header. UIElements are transitory objects - so the UIElement cannot store the value of the check box.
My guess is that the sample is storing the state of the CheckBox on the column or on the Column Header - probably on the Tag property. Since the column is the same for every island of data, the checkboxes are all syncrhonized.
If you want to have a different check state for each island of data, then you need to modify the sample so that it stores the check state somewhere specific to that data island.
It looks like the data in your sample is being broken up by OutlookGroupBy. So you could use the GroupByRow's Tag or the RowsCollection.
Hi Mike,
I am also facing the same issue we are using the code
if (aHeader.Tag == null) aHeader.Tag = CheckState.Unchecked; else aCheckBoxUIElement.CheckState = (CheckState)(aHeader.Tag);
can provide some sample to get row collection from the getcontext. to verify if it is a group row or not.
Thanks and regards
The grid now has built-in CheckBoxes in the column headers. So all of this code is obsolete if you have a recent version of the controls.
I think we have a problem here. My project is implemented using v8.2. And as per my understanding in this version header doesn't include checkbox.
So we have to use creation filter for this. But it is causing problem in Sync header checkbox in case of groups. Can you please help me with this?
Thanks and Regards
Okay... so where are you getting stuck? If you retrieved the rows collection, then you can simply check IsGroupByRowsCollection. If you have a row, you can check IsGroupbyRow.
Or have you not gotten that far?
If you have a RowsCollection (which you can get from GetContext) then you can check IsGroupByRows to see if you are dealing with a collection of GroupByRows or non-GroupByRows.
I'm not sure what you are trying to do, though. What do you mean by "other group?"
I am able to get the Row collection. Now i am stuck at how to disable the header checkbox of other group?
Please take a look on this on priority. I am stuck on this from days and it is effecting my work.
Actually i am not able to retrieve row collections.