change column header name in MultiColumnComboBox

How do I change column header name in MultiColumnComboBox control


1 Reply

AD Administrator Syncfusion Team April 28, 2008 11:11 AM UTC

Hi Nalin,

Thank you for using Syncfusion products.

MultiColumnComboBox - Changing HeaderText.

You can change the text of column header in MultiColoumComboBox using QueryCellInfo event handler. The following code snippet illustrates this.

C#

this.multiColumnComboBox1.ListBox.Grid.QueryCellInfo += new Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventHandler(Grid_QueryCellInfo);
}

void Grid_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
{
//Check for column header row
if (e.RowIndex == 0)
{
//Check for particular column
switch (e.ColIndex)
{
case 1:
e.Style.Text = "Column 1";
break;
case 2:
e.Style.Text = "Column 2";
break;

case 3:
e.Style.Text = "Column 3";
break;
}
}
}


Sample

http://websamples.syncfusion.com/samples/Tools.Windows/F73256/main.htm

Please let me know if this helps you.

Regards,
Jaya



Loader.
Up arrow icon