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

Update Cell in Selected Row

1 Answer 202 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
Marianne
Top achievements
Rank 1
Veteran
Marianne asked on 20 Apr 2020, 02:26 PM

I built a virtual grid which may get large so I am deferring adding a link which may take some processing to find until the row is actually selected.  Is this a good idea?  Can it even be done?  And if so does the entire grid then have to be rebuilt?

I want to add that 10 years ago a Microsoft evangelist recommended I ask for Telerik controls - and when my next job developing web pages had only the default set it was like trying to cook with dull knives when you were used to a razor sharp set.  I have them at my current job - and what a difference it makes!

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 23 Apr 2020, 11:51 AM

Hello Marianne,

Following the provided information, it seems that you use RadVirtualGrid and you would like to update a cell in a selected row. However, it is not completely clear to me what exactly you are trying to achieve while reading your first sentence. This is why if the provided answer doesn't satisfy you I would kindly ask you to provide more information about what exactly you are trying to achieve.

Let me explain more about RadVirtualGrid. RadVirtualGrid is a grid component developed on top of the Telerik Presentation Framework. One of the most significant things is that RadVirtualGrid loads data on demand. This means that it provides a convenient way to implement your own data management operations and optimizes the performance when interacting with large amounts of data. It is necessary to specify how many rows and columns are going to be displayed in RadVirtualGrid by setting the RowCount and ColumnCount properties. Then, handle the CellValueNeeded event where you should specify the Value argument in the VirtualGridCellValueNeededEventArgs.

RadVirtualGrid allows users to edit the cells values. Usually, this process starts by typing in the cell or by pressing F2. By default, the editor type is determined according to the data value type. When in edit mode, the user can change the cell value and press Enter to commit the change or Esc to revert to the original value. Clicking outside the edited cell also commits the change.

When the user updates the cell nevertheless if he adds a new row, updates the current value, or deletes it, the external data source should be updated as well. In order to keep the data synced, you should handle the CellValuePushed event in order to detect when a cell value is changed and then update your external source collection. This will force CellValueNeeded event to fire again and update the virtual grid with the updated value. Similarly, The UserAddedRow and UserDeletingRow events are appropriate for detecting when the end-user adds or deletes a row and update the external collection accordingly. The following help articles are quite useful on this topic:
https://docs.telerik.com/devtools/winforms/controls/virtualgrid/working-with-data/virtualgrid-populating-with-data
https://docs.telerik.com/devtools/winforms/controls/virtualgrid/working-with-data/handle-add-delete-update-of-rows

Our Demo application >> VirtualGrid >> First Look example is very helpful to get familiar with how RadVirtualGrid manages the data.

I hope this information is useful. If you need any further assistance please don't hesitate to contact me. 

Regards,
Nadya
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
VirtualGrid
Asked by
Marianne
Top achievements
Rank 1
Veteran
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or