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

LoadingRowDetails fired more than once when scrolling.

2 Answers 148 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mausami
Top achievements
Rank 1
Mausami asked on 24 May 2011, 12:44 PM
Hello Telerik team,

I am using a WPF rad grid {EnableRowVirtualization is set to"True"}.

I have used the GridViewToggleRowDetailsColumn column to toggle the visibility of the row details section of each row. 
I have some editable fields in the row details section like checkbox, dropdown.

On click of the expand button(+), I am populating these fields with some default values in  radGrid_LoadingRowDetails event.

I change the values in the fields and the leave the details section expanded. Then scroll down the grid so that the row move out of the window range and scroll up to the row again, the LoadingRowDetails fired again, thus reloading the fields in the details section with default values and thus the state of the fields is lost.

Is there any way to control the re-firing of the LoadingRowDetails on scroll if the row details section is already expanded.

Please provide your inputs.


Thanks,
Regards,
Mausami Sawant.

2 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 24 May 2011, 01:38 PM
Hello Mausami,

 Since EnableRowVirtualization is set to true the grid will reuse its UI containers on vertical scroll.

Thus, when a row is recycled this event fires to ensure its contents will be set correctly according to the row data context.

In your scenario there to options:

 - disable row virtualization (which I believe you have already find out).
 - bind your row details contents to suitable viewmodel (Please, refer to our demos for row details), so that any change will be updated in the data and later displayed correctly. 

All the best,
Tsvyatko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mausami
Top achievements
Rank 1
answered on 02 Jun 2011, 07:40 AM
Hi Tsvyatko,

Unfortunately I am not in a position to use any of the solutions.

-disable row virtualization  : This cannot be done as the requirement is to show all the records in the rad grid on load.
- bind your row details contents to suitable viewmodel  : The architecture of the project is already in place and now cannot switch to view model


Is there any other place I can perform the process of fetching the row details.
Like rather than the radGrid_LoadingRowDetails event, some event of the telerik:GridViewToggleRowDetailsColumn  column. Is there a click event of the this column type.


Please suggest.

Thanks,
Regards,
Mausami Sawant.
Tags
GridView
Asked by
Mausami
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Mausami
Top achievements
Rank 1
Share this question
or