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

RowStyles & ColumnStyles missing in WPF GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

91754 Dec 1,2009 12:30 PM UTC Dec 9,2009 05:30 PM UTC ASP.NET Web Forms (Classic) 2
loading
Tags: GridGroupingControl
Philippe Chessa
Asked On December 1, 2009 12:30 PM UTC

Hello,

Contrary to what says the documentation, it appears that the properties RowStyles and ColumnStyles do not exist in the WPF GRidControl (Essential 7.4).
At least, I cannot find them with the

Philippe Chessa
Replied On December 1, 2009 12:37 PM UTC

Oops! My previous mail was posted untimely...

Hello,

Contrary to what says the documentation, it appears that the properties RowStyles and ColumnStyles do not exist in the WPF GRidControl (Essential 7.4).
At least, I cannot find them with the Object Browser.

How do I define a style for Rows and/or Columns so that I can overide it for specific cells in the QueryCellInfo handler?

Thanks in advance.
Philippe


Ganesan K [Syncfusion]
Replied On December 9, 2009 05:30 PM UTC

Hi Philippe,

Thanks for using syncfusion products.

There is no specific RowStyle or ColumnStyle in our GridControl. If you want to override specific cell style, you have to listen the QueryCellInfo event and set the style for each cell.

You can use the following code snippet for applying RowStyle and / or column style.

[C#]
grid.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(Model_QueryCellInfo);

void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
//// This will apply style for the second row.
if (e.Cell.RowIndex == 2) {
e.Style.Background = Brushes.BlanchedAlmond;
}

if (e.Cell.ColumnIndex == 4) {
e.Style.Background = Brushes.LightBlue;
}
}


Thanks,
Ganesan

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

;