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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TableDescriptor columns order

Thread ID:





46552 Jul 14,2006 07:03 PM UTC Jul 18,2006 12:19 AM UTC WinForms 3
Tags: Grouping
Irina Jouk
Asked On July 14, 2006 07:03 PM UTC

Hi, How the columns order is assigned in TableDescriptor?. The Datasource of my Grouping control is a struct. Just after datasource was set, the TableDescriptor has different columns order (which defines display order)then struct had. So how could I control columns order?

Administrator [Syncfusion]
Replied On July 17, 2006 07:02 AM UTC

Hi Irina, Refer to the KnowledgeBase(KB) article link below, that helps in doing this. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=159 Thanks for using Syncfusion Products. Regards, Rajagopal

Irina Jouk
Replied On July 17, 2006 05:09 PM UTC

Hi Rajagopal, In TableDescriptor by default I have col#3 ''Memo'' and col#6 ''Hours'' When I try to change the order of both columns to display first ''Hours'' and then ''Memo'' by using tableDescriptor.Columns[3].Name="Hours" I get an error {"Item has already been added. Key in dictionary: \"Hours\" Key being added: \"Hours\"" } When I use tableDescriptor.VisibleColumns[3].Name="Hours", it works, but when later in TableModel_SaveCellFormattedText event I use grpctrlActivityList.TableDescriptor.NameToField("Hours") it returns original col index (i.e. #6). Looks like VisibleColumns order is changed but not Columns order. What can I do with that? Thanks

Administrator [Syncfusion]
Replied On July 18, 2006 12:19 AM UTC

If you want to move columns in the Columns collection, then try using TableDescriptor.Columns.Move. //move "Col2" to position 2 in the Columns collection int col4 = gridGroupingControl1.TableDescriptor.Columns.IndexOf("Col4"); gridGroupingControl1.TableDescriptor.Columns.Move(col4, 2); Or, you can use gridGroupingControl1.TableDescriptor.Columns.Remove to remove an existing and then use gridGroupingControl1.TableDescriptor.Columns.Insert to insert it somewhere else in the collection.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon