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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to reorder columns in multicolumncombobox

Thread ID:





62373 Jun 13,2007 07:05 PM UTC Jun 14,2007 03:45 AM UTC WinForms 1
Tags: Tools
Kamen Yotov
Asked On June 13, 2007 07:05 PM UTC

i am playing with multicolumncombobox.
i am data-binding an array of custom created objects as a data-source and their public properties show as column (as the documentation says).

how do i choose the order in which the columns appear? it is not related to the order the properties are declared in the source...

JayaLakshmi [Syncfusion]
Replied On June 14, 2007 03:45 AM UTC

Hi Kamen,

Thank you for using Syncfusion products.

You can achieve the reordering of the columns by storing the column information in a Hashtable and by handling Grid_PrepareViewStyleInfo event.

Here is the code snippet.

this.multiColumnComboBox1.ListBox.Grid.PrepareViewStyleInfo+=new Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventHandler(Grid_PrepareViewStyleInfo);

Hashtable hash = new Hashtable();
void Grid_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
GridControl grid = sender as GridControl;
if (hash.Contains(e.ColIndex))
if (hash[e.ColIndex] != null)
e.Style.CellValueType = grid[e.RowIndex, int.Parse(hash[e.ColIndex].ToString())].CellValueType;
e.Style.Text = grid[e.RowIndex, int.Parse(hash[e.ColIndex].ToString())].Text;

Please refer the sample in the below link and let me know if this helps.




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