Paul R
2017-02-02T11:56:54Z
How do I tell if the row the user has selected is a Grouped row? How do I then programmatically expand/contract that group?
Igor/10Tec
2017-02-03T08:00:37Z
Originally Posted by: Paul R 

How do I tell if the row the user has selected is a Grouped row?



if (iGrid1.CurRow.Type == iGRowType.AutoGroupRow)


Originally Posted by: Paul R 

How do I then programmatically expand/contract that group?



iGrid1.CurRow.Expanded = true; // to expand
iGrid1.CurRow.Expanded = false; // to collapse


See also the properties and methods of the iGRow class that represents an iGrid row in the electronic documentation.
Paul R
2017-02-03T09:01:42Z
Thankyou, just what I needed.

Is it possible to detect if the user clicked the +/- to expand/contract a group? I want to be able to expand/contract the group when the user clicks anywhere on the line not just the +/-. By implementing the code above I can do that, but when the +/- is clicked the group expands then immediately contracts - presumably because the control is expanding then the code immediately contracts.
Igor/10Tec
2017-02-03T09:52:05Z
Try to use the CellMouseDown event for that. Check its e.ElemControl parameter, and if it is a tree button, prohibit the default action by setting e.DoDefault to False.
Paul R
2017-02-03T10:08:48Z
Thanks, got it working as the boss requires now. :)

Side note, the forum seems to think I have 0 posts!?
Igor/10Tec
2017-02-03T15:00:05Z
Originally Posted by: Paul R 

Side note, the forum seems to think I have 0 posts!?



Oops. It seems this is the problem of the YAF forum engine we use for this forum. We'll contact the YAF developers to investigate this issue. Thank you for pointing that out.

Paul R
2017-02-06T16:28:47Z
Forum issue fixed?

Yes, seems to be fixed, my post count is now 1.