Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Paul R  
#1 Posted : Thursday, February 2, 2017 11:56:54 AM(UTC)
Paul R

Rank: Member

Groups: Registered
Joined: 8/5/2016(UTC)
Posts: 13

Thanks: 1 times
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  
#2 Posted : Friday, February 3, 2017 8:00:37 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 829

Thanks: 11 times
Was thanked: 107 time(s) in 107 post(s)
Originally Posted by: Paul R Go to Quoted Post
How do I tell if the row the user has selected is a Grouped row?


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


Originally Posted by: Paul R Go to Quoted Post
How do I then programmatically expand/contract that group?


Code:
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  
#3 Posted : Friday, February 3, 2017 9:01:42 AM(UTC)
Paul R

Rank: Member

Groups: Registered
Joined: 8/5/2016(UTC)
Posts: 13

Thanks: 1 times
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  
#4 Posted : Friday, February 3, 2017 9:52:05 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 829

Thanks: 11 times
Was thanked: 107 time(s) in 107 post(s)
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.
thanks 1 user thanked Igor/10Tec for this useful post.
Paul R on 2/3/2017(UTC)
Paul R  
#5 Posted : Friday, February 3, 2017 10:08:48 AM(UTC)
Paul R

Rank: Member

Groups: Registered
Joined: 8/5/2016(UTC)
Posts: 13

Thanks: 1 times
Thanks, got it working as the boss requires now. :)

Side note, the forum seems to think I have 0 posts!?
Igor/10Tec  
#6 Posted : Friday, February 3, 2017 3:00:05 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 829

Thanks: 11 times
Was thanked: 107 time(s) in 107 post(s)
Originally Posted by: Paul R Go to Quoted Post
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  
#7 Posted : Monday, February 6, 2017 4:28:47 PM(UTC)
Paul R

Rank: Member

Groups: Registered
Joined: 8/5/2016(UTC)
Posts: 13

Thanks: 1 times
Forum issue fixed?

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

Edited by user Monday, February 6, 2017 4:31:10 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.