This is a migrated thread and some comments may be shown as answers.

Get the cell style that has been applied via CellStyleSelector

1 Answer 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 07 Aug 2017, 07:41 PM

I'm using a CellStyleSelector to switch the style based on some properties of the model bound to the row

When I'm persisting the layout i need to save those style (Background and Foreground color) on two properties of my Columnproxy.

Before using the CellStyleSelector I was getting the column.CellStyle but now I got a null on that property and I'm unable to retrieve the current cell style.

Is it possible or since it's done on the fly I cannot have it?

Thanks

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 10 Aug 2017, 12:31 PM
Hello Paolo,

The behavior explained in your post is expected. When you set the style selector the CellStyle is not set. What I can suggest you is to create a property in your model. You can set this property for example to the style applied the style selector. Or set it to some other information which can notify you about what style is set to this cell.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Michele
Top achievements
Rank 2
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or