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

GLC Formatting before combo dropdown

Hi All, I have a regular non-bound Grid Control and one of the cells is of type "GridListControl." It is a dropdown grid activated combo style. The data within this DD.GLC is dynamic and I would like to format the text in each row based on the data in that GLC row. The data source for the DD.GLC is an arrayList and is built after the user has chosen something from within a different non-bound grid cell. Where can I hook into to format a specific cell in the DD.GLC? Thanks in advance, Felix

1 Reply

AD Administrator Syncfusion Team May 13, 2005 08:47 PM

You have to subscribe the QueryCellInfo event of the embedded GridListControl of the cell. To subscribe, you can use GridDropDownGridListControlCellRenderer cr = this.gridControl1.CellRenderers["GridListControl"] as GridDropDownGridListControlCellRenderer; GridListControl glc = cr.ListControlPart; glc.Grid.QueryCellInfo += new GridQueryCellInfoEventHandler(Grid_QueryCellInfo); In the handler, specify whatever properties you want on the style for teh particular cell.
private void Grid_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
	//format a specific cell
	if(e.RowIndex == 2 && e.ColIndex == 3)
	{
		e.Style.BackColor = Color.Red;
	}
}

            

Loader.
Live Chat Icon For mobile
Up arrow icon