radgridview virtual mode

3 posts, 0 answers
  1. Louis
    Louis avatar
    2 posts
    Member since:
    Aug 2011

    Posted 16 Aug 2011 Link to this post

    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)

  2. Louis
    Louis avatar
    2 posts
    Member since:
    Aug 2011

    Posted 17 Aug 2011 Link to this post

    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.

  3. Julian Benkov
    Julian Benkov avatar
    1135 posts

    Posted 18 Aug 2011 Link to this post

    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 >>

Back to Top