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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CellStyleSelector on Realtime application

Thread ID:





117097 Aug 11,2014 10:04 AM UTC Aug 12,2014 11:09 AM UTC WPF 1
Tags: SfDataGrid
Asked On August 11, 2014 10:04 AM UTC

We have a real-time application that the style of a cell will depend on the value on the other cell on the same row.

Thus, we try to use the CellStyleSelector to help update the cell style on real time.

The styles are applied correctly during the Grid Initialization, however, when the data are updating, we expect the cell style will be changed accordingly, but it doesn't.

The attachment is a project to reproduce the issue.
In the project, we expect that when Change >=0, we will apply Bold to the Symbol cell.

Attachment: PerformanceDemo_4d0f3818.rar

Farjana Parveen Ayubb [Syncfusion]
Replied On August 12, 2014 11:09 AM UTC

Hi Antony,


Thank you for contacting Syncfusion Support.


We analyzed your query. You can achieve your requirement by using the Converter for changing the Symbol column weight to Bold while Changing>=0.


Please refer the following code snippet and sample in the following location:


Code Snippet(XAML) :

<syncfusion:GridTemplateColumn MappingName="Symbol" TextAlignment="Left"                                                                           CellStyleSelector="{StaticResource stockCellStyleSelector}" UpdateTrigger="PropertyChanged">



                                        <TextBlock FontWeight="{Binding Change, Converter={StaticResource changefontweight}}"

                                                   Text="{Binding Symbol}"/>





Code Snippet(C#):

internal class ChangeFontWeight : IValueConverter


        object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo info)



                return FontWeights.Bold;


                return FontWeights.Normal;



        object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo info)


            throw new NotImplementedException();






Farjana Parveen A


Attachment: PerformanceDemo_6d58be84.zip


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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