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

CellValueNeeded event

4 Answers 139 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
Amand
Top achievements
Rank 1
Amand asked on 08 Dec 2016, 02:19 PM

Hello,

I was wondering if there is a way to know when the fire of CellValueNeeded event will end ? Like is there a way to know the cells row and column range on which the update/synchronize will be done ?

Hoping my question is understandable :)

 

Greetings.

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 12 Dec 2016, 10:38 AM
Hello Amand,

Thank you for writing.

This can be taken after the grid is populated for the first time:
var lastRow = radVirtualGrid1.TableElement.ViewElement.ScrollableRows.Children.Last() as VirtualGridRowElement;
var lastRowIndex = lastRow.RowIndex;
 
var lastCellIndex = lastRow.CellContainer.Children.Count;
 
Console.WriteLine("LastRow {0} LastCell {1}", lastRowIndex, lastCellIndex);

In addition, I wanted to ask you why do you need this information and what is the exact functionality that you want to achieve? This information will allow me to suggest a better solution if such exists.

I am looking forward to your reply.
 
Regards,
Dimitar
Telerik by Progress
Telerik UI for WinForms is ready for Visual Studio 2017 RC! Learn more.
0
Amand
Top achievements
Rank 1
answered on 13 Dec 2016, 11:35 AM

Hello,

Thanks you for your reply.

We are actually creating a library which can "serialize" our software objects properties into tabular edition to be edited more easily. We tried to load all our objects in memory ( 10k~100k objects / 30 properties by object) but this leads to massive memory consumption. In order to gain memory footprint we do atomic serialization for every object needed for display which lead to certain overhead when CellValueNeeded calls for every column of a specific line ( this means we do "n" serialization of the same object for "n" column in order to get the object properties). The main point is to predict which cells we'll be needed for display to group them and build a smaller cache memory to avoid to do same serialization request several times.

Hoping this little explanation helps you to understand our needs :)

Regards.

0
Dimitar
Telerik team
answered on 14 Dec 2016, 11:17 AM
Hello Amand,

Please note that RadVirtualGrid supports layout saving/loading and this functionality only serializes the needed information which does not include the properties of the visual elements. And I cannot see a good reason for serializing the visual elements. What do you want to edit in these objects?

I am looking forward to your reply.
 
Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Amand
Top achievements
Rank 1
answered on 14 Dec 2016, 02:22 PM

Hello,

Unfortunately I think my explanation was not accurate enough :( Anyway your first reply give us enough information for our need.

Thank you for your help :) .

Regards,

Amand

Tags
VirtualGrid
Asked by
Amand
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Amand
Top achievements
Rank 1
Share this question
or