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

custom format with virtualization

5 Answers 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Travis
Top achievements
Rank 1
Travis asked on 09 Oct 2014, 05:20 PM
I have some code that custom formats a row depending on a column value in a radgrid.  I notice that this formatting rule is working on the first page of the grid however it doesn't work on the other pages.  Note I'm using virtualization in the grid turned on and from what I read this will only work on the first page.  Has anyone else ran into this issue and know of a way to custom format all pages with virtualization turned on?

Thanks

5 Answers, 1 is accepted

Sort by
0
Travis
Top achievements
Rank 1
answered on 13 Oct 2014, 03:51 PM
Any info on this would be greatly appreciated.  

0
Viktor Tachev
Telerik team
answered on 14 Oct 2014, 11:27 AM
Hello Travis,

I noticed that you are using an older version of the controls. Would you try to upgrade to the latest version of the controls (currently 2014.3.1002) and see if the behavior changes?

In addition I am attaching a sample project I used for testing the behavior. The style that is defined in the ItemDataBound handler is applied as expected on my end. Give the sample a try and see if it works for you.

Additionally, please let me know what is different in your scenario. What needs to be changed in the sample in order to reproduce the issue?

Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Travis
Top achievements
Rank 1
answered on 14 Oct 2014, 05:21 PM
Thanks for the response.

Are you referring to the beta version of the ASP AJAX controls?

A couple differences between my scenario is I have EnableCurrentPageScrollOnly set to true and using a page size of 100.  Also since you are using mod 5 equal to zero you will always have the same row number on each page highlighted.  I notice this on my project as well, for example, if row number 5, 10, 15, etc are highlighted on page one the same rows are highlighted on page two (5th,10th, 15th row on each page, etc) which is accurate in your example but not my project.  If you change your scenario to mod 7 you'll see what I'm talking about.  Row 7,14,21, etc will be highlighted on all the pages which isn't correct but only for the first page.  When using page size = 100, the first row highlighted on page 2 should be the 5th row with ID=105. 


0
Accepted
Viktor Tachev
Telerik team
answered on 17 Oct 2014, 11:31 AM
Hi Travis,

In order to achieve the behavior you would need to use client-side logic. You need to handle the RowDataBound and RowCreated client events and apply the necessary styles.

For your convenience I have prepared a sample project where the approach is implemented.

Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Travis
Top achievements
Rank 1
answered on 23 Oct 2014, 01:41 PM
Thanks Viktor, that fixed my problem.  
Tags
Grid
Asked by
Travis
Top achievements
Rank 1
Answers by
Travis
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or