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
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.
Dimitar
Telerik by Progress
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.
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.
Dimitar
Telerik by Progress
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