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

PushButton enabled in cell

Thread ID:

Created:

Updated:

Platform:

Replies:

15611 Jun 23,2004 01:05 PM UTC Jun 23,2004 01:35 PM UTC Windows Forms 1
loading
Tags: GridControl
Nicola
Asked On June 23, 2004 01:05 PM UTC

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

Administrator [Syncfusion]
Replied On June 23, 2004 01:35 PM UTC

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;
}

CONFIRMATION

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.

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

;