We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Expand functionality in Grouping grid

Thread ID:

Created:

Updated:

Platform:

Replies:

29087 May 16,2005 11:35 PM May 18,2005 04:50 AM Windows Forms 4
loading
Tags: GridControl
Prathima Venkobachar
Asked On May 16, 2005 11:35 PM

Hi, Can I do expand of only the selcted grouped rows in a grouping grid..? If I use Groupinggrid.Table.ExpandAllGroups(); It expands all the grouped rows. I want to expand only highlighted or selected grouped row.Is there any method to do this..? Thx in advance, Prathima

Administrator [Syncfusion]
Replied On May 17, 2005 06:39 AM

Given a Group g, you can expand or collapse it by setting g.IsExpanded to true or false. Same is true for a GridRecord r using r.IsExpanded. (You can also use teh Record.SetSelected method too.) Here is a little button handler that will expand all selected records in a nested table.
private void button1_Click(object sender, System.EventArgs e)
{
	this.gridGroupingControl1.Table.CollapseAllRecords();
	foreach(SelectedRecord r in this.gridGroupingControl1.Table.SelectedRecords)
	{
		r.Record.IsExpanded = true;
	}
}

Prathima Venkobachar
Replied On May 18, 2005 01:58 AM

Thx for the reply. I have 10 grouped rows.I hv expanded 3 grouped rows.I have selected the record in the first grouped row.Now if I click expangOnlySelected group, I get selectedrecords count zero. I assume selected reocrd is nothing but selected row inside a grouped row. Thx, prathima >Given a Group g, you can expand or collapse it by setting g.IsExpanded to true or false. Same is true for a GridRecord r using r.IsExpanded. (You can also use teh Record.SetSelected method too.) > >Here is a little button handler that will expand all selected records in a nested table. >
>private void button1_Click(object sender, System.EventArgs e)
>{
>	this.gridGroupingControl1.Table.CollapseAllRecords();
>	foreach(SelectedRecord r in this.gridGroupingControl1.Table.SelectedRecords)
>	{
>		r.Record.IsExpanded = true;
>	}
>}
>
> >

Administrator [Syncfusion]
Replied On May 18, 2005 03:49 AM

I do not know what ''expangOnlySelected'' is. To use gridGroupingControl1.Table.SelectedRecords, make sure you have set: this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None; this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;//something other than None.

Prathima Venkobachar
Replied On May 18, 2005 04:50 AM

''expangOnlySelected'' is a btn I hv in the form. Onclick of this, I shd expand only one grouped row which is selected. still I get gridGroupingControl1.Table.SelectedRecords count zero. >I do not know what ''expangOnlySelected'' is. > >To use gridGroupingControl1.Table.SelectedRecords, make sure you have set: > >this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None; >this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;//something other than None. >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;