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

Manually Applied formating is lost and mess up after scrolling

3 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Imran Javed Zia
Top achievements
Rank 1
Imran Javed Zia asked on 01 Aug 2012, 11:54 AM

Hi,

We had a RadGrid on a form and we are changing cell background of cells manually depending on values in the cells. ANd it works fine but when we scroll down and then back to up then applied colors are meshed up and applied incorrectly
We are using 2011.2.920.40 version of WPF controls.

Thanks

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 01 Aug 2012, 05:07 PM
Hello,

Generally it is not recommended to work with the visual element of the GridView directly. You can use a CellStyleSelector to apply an appropriate style for the cells. This should fix the problem on scrolling.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Imran Javed Zia
Top achievements
Rank 1
answered on 06 Aug 2012, 02:42 PM
Hi Didie,
We are already using  CellStyleSelector but were using 2011.2.

We have tried 2012.2.725.40 but getting same issue, I have uploaded  a sample project WPFTestCellFormating.zip for reference on following url.

https://skydrive.live.com/redir?resid=722083C5D931ED6A!186&authkey=!AMzvv2wEc_E0_tA

Thanks and Regards
0
Maya
Telerik team
answered on 06 Aug 2012, 03:29 PM
Hi Imran,

The behavior you get is a result of the way you define your custom column. Since RadGridView is virtualized control, it is always recommended to work with data items (not visual elements) and count on Bindings instead of setting a particular property.
I would recommend you to run through this article and this blog post for a reference. 

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Imran Javed Zia
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Imran Javed Zia
Top achievements
Rank 1
Maya
Telerik team
Share this question
or