|
Rank: Member Groups: Member
Joined: 5/1/2008 Posts: 16
|
Hi,
I have a classic example of two GridViews each appearing to have the same columns. The user has the ability of moving a row in Grid1 and adding it to Grid2 (perhaps a button for each row and do a postback?).
I am assuming I insert a row in Grid2, copy the values from Grid1 to Grid2, and remove row from Grid1.
What is the best way to accomplish this with your Grid object?
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi Mark,
It will be pretty much the same. Two GridView does not directly interact with each other, this is also the case for our Grid.
Once difference is, our Grid always populate from a DataSource. So whether it's deleting or inserting, you must update your data source first.
Thanks
|
|
Rank: Member Groups: Member
Joined: 5/1/2008 Posts: 16
|
Sorry for the confusion. I didn't explain myself properly.
I want to add a row in a Grid and delete a row in a Grid. ( I won't be updating any datasources until the user has finished manipulating all data in my grids.)
what is the best practice for doing this with your object?
thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
mark836 wrote:I want to add a row in a Grid and delete a row in a Grid. ( I won't be updating any datasources until the user has finished manipulating all data in my grids.)
That's what I was telling you....you can NOT do that without updating your datasource. However, the Grid's DataSource doesn't necessary to be your database. For example, you can fill a DataTable from your database, then add/delete on that DataTable and use that DataTable as the Grid's DataSource. By the time you are ready to save all the changes, you can then save the changes from the DataTable back to your database.
|
|