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

radgridview virtual mode

2 Answers 165 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 1
Louis asked on 16 Aug 2011, 09:14 PM
I have been evaluating the Winforms SDK and I am stuck implementing  a grid with  a large changing dataset that I want to display in real-time. If I implement my own IBinding list and set it to the grid's data source is that advisable or should I use virtual mode. I don't know how to implement virtual mode in terms of database changes being realized by the grid (ie. add, delete, modify, insert records). I can't seem to find any information on this relating to notifying the grid that a row has been inserted, deleted etc. I also want the screen painting to be minimized and the currently selected row not to change while data is being updated (unless of course a delete cause the data view to scroll up)
Thanks

2 Answers, 1 is accepted

Sort by
0
Louis
Top achievements
Rank 1
answered on 17 Aug 2011, 09:53 PM
Correct me if I am wrong - if I bind a datasource to the grid it will fetch ever record. I implemented a IBindingListView class and that is the result I am getting even though I set virtual mode to true.

So am I to assume that you cannot bind a datasource to the grid if you want it to truly act in virtual mode (ie only fetch what it needs to display).

If this is the case how do I notify the grid that a record has been either added, deleted, inserted, changed?

Telerik please post an answer soon -we are evaluating your toolkit and can't proceed until this is resolved.

Thanks
Louis
0
Julian Benkov
Telerik team
answered on 18 Aug 2011, 03:24 PM
Hello Louis,

You can use RadGridView control in virtual mode by setting the VirtualMode property to true and handling the CellValueNeeded event to populate cells' data values. To refresh grid in virtual mode, you can use Refresh method of MasterTemplate property, which in this scenario calls CellValueNeeded callback again for all visible cells. Please keep in mind that in this mode the sorting, grouping and filtering operation are not supposed.

When you setup the DataSource of RadGridView, the control switches to bound mode. The two modes are different and can not be mixed. In bound mode you must implement IBindingList interface in your custom list object and INotifyPropertyChanged to your item custom object to support autoupdate in grid control when some external CRUD operation occurs.

Best wishes,
Julian Benkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
GridView
Asked by
Louis
Top achievements
Rank 1
Answers by
Louis
Top achievements
Rank 1
Julian Benkov
Telerik team
Share this question
or