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. Image for the cookie policy date
close icon

using special cell types in virtual grids

Is there a method for using ComboBox or other celltypes in virtual grid that I am using as an input front end to an excel workbook? (So that user selections are automatically reflected in the worksheet associated with the grid?)

1 Reply

JJ Jisha Joy Syncfusion Team June 4, 2010 05:34 AM UTC

Hi Jan,

THank you for using Syncfusion products.

In VirtualGrid you need to handle QueryCellInfo to set celltype in Virtual GridControl. See the code:


private void gridControl1_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
{
//Other code

if(e.RowIndex > 0 && e.ColIndex > 0 && e.ColIndex <= 5)
{
e.Style.BackColor = Color.AliceBlue;
e.Style.CellType = "ComboBox";
e.Style.ChoiceList = sc;
e.Style.DropDownStyle = GridDropDownStyle.Exclusive;
e.Style.ShowButtons = GridShowButtons.Hide;

}

//Other code
e.Handled = true;
}

Regards,
Jisha

Loader.
Live Chat Icon For mobile
Up arrow icon