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

PushButton enabled in cell

I''m having a problem disabling individual cell buttons in a databoundgrid. I''ve tried setting various properties in the PrepareViewStyleInfo function and none of them seem to work. So far I''ve tried e.Style.ReadOnly e.Style.Clickable e.Style.ShowButtons e.Style.Enabled Am I missing something? Thanks Nicola

1 Reply

AD Administrator Syncfusion Team June 23, 2004 09:35 AM

PrepareViewStyleInfo is mainly used for setting drawing properties (like BackColor). To set behavioral properties like Clickable, try using teh grid.Model.QueryCellInfo event.
//in formload
this.gridDataBoundGrid1.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(Model_QueryCellInfo);
		
//the handler
private void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
	if(e.ColIndex == 2 && e.RowIndex == 2)
		e.Style.Clickable = false;
}

Loader.
Live Chat Icon For mobile
Up arrow icon