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

Adding/Editing a row outside of the grid

2 Answers 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 06 Jul 2010, 10:10 AM
I have a simple question - how can I add/edit a single row in the grid with data that has been defined outside of the grid. I don't want to rebind in any way since that will cause a costly database query. I've looked at the set_datasource(json) mechanism, but that requires returning all the row data (and thus a re-query) from the Ajax/Page method call. I just want to add/edit a row with known data. With or without Ajax is fine. Is this possible?

Thanks.

- Mike

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Jul 2010, 10:27 AM
Hi Mike,

Check out the demo on "Editing with external form" and see whether it suits your need.


-Shinu.
0
Mike
Top achievements
Rank 1
answered on 06 Jul 2010, 11:06 AM
Shinu,

Thanks for your response. Doesn't this solution ultimately do a Rebind() (and thus a database query)?

From the RadGrid1_UpdateCommand method:
        //rebind the table and select the item after the update operation 
        e.Item.OwnerTableView.Rebind(); 
 

The key thing in my case is that I have a grid bound to a very large data set. I want to be able to add/edit a row into the grid with known data without ultimately doing a Rebind() on the server - since that will cause a database re-query that I'm trying to avoid.

Thanks,

- Mike
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mike
Top achievements
Rank 1
Share this question
or