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.

Microsoft OutLook Kind of View

Thread ID:





18603 Sep 3,2004 06:32 AM Sep 3,2004 07:36 AM Windows Forms 1
Tags: GridControl
Asked On September 3, 2004 06:32 AM

Hi , Is it Possible to have view like Microsoft Outlook when a grouping grid is grouped based on column i.e. when the column is dragged to the Groupdroparea , it should be removed/hide from the grid and when it is dragged back to the grid it appears agian at his original position(retaining the index before dropping)

Administrator [Syncfusion]
Replied On September 3, 2004 07:36 AM

For now, you will have to handle an event to do this type of thing. You can listen to the GroupedColumns changed event, and hide/show things in your event handler. You will also need to keep track of the column and where it was. Here are some snippets.
//subscribe to the event
this.gridGroupingControl1.TableDescriptor.GroupedColumns.Changed += new Syncfusion.Collections.ListPropertyChangedEventHandler(GroupedColumns_Changed);

//used to track where/what column needs to be shown/hidden
private Hashtable saveLocation = new Hashtable();
private Hashtable saveColumn = new Hashtable();

//the handler
private void GroupedColumns_Changed(object sender, ListPropertyChangedEventArgs e)
	SortColumnDescriptor col = e.Item as SortColumnDescriptor;
	int i = this.gridGroupingControl1.TableDescriptor.VisibleColumns.IndexOf(col.Name);
	if(i > -1)
		saveLocation.Add(col.Name, i);
		saveColumn.Add(col.Name, this.gridGroupingControl1.TableDescriptor.VisibleColumns[i]);
		i = (int) saveLocation[col.Name];
		GridVisibleColumnDescriptor vcol = saveColumn[col.Name] as GridVisibleColumnDescriptor;
		this.gridGroupingControl1.TableDescriptor.VisibleColumns.Insert(i, vcol);


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.