Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   Datagrid batch update (http://www.velocityreviews.com/forums/t761138-datagrid-batch-update.html)

Applevalley01 09-26-2004 04:37 AM

Datagrid batch update
 
I have created an excel like grid where the grid defaults to edit mode when
it is renderered. But I would like a way to perform a batch update since I am
dealing with 10000 rows in the grid. I do not want to make a roundtrip to the
database for each row that was modified. I would appreciate it if someone can
help me with that.

Flare 09-26-2004 05:57 PM

Re: Datagrid batch update
 
>I have created an excel like grid where the grid defaults to edit mode when
> it is renderered. But I would like a way to perform a batch update since I
> am
> dealing with 10000 rows in the grid. I do not want to make a roundtrip to
> the
> database for each row that was modified. I would appreciate it if someone
> can
> help me with that.


Save to datasource to eg the Session["MyTempDataSource"] = MyDataSource;

And when you rebind your datagrid in OnUpdate you use the datasoource in
session. Then you can (if you are using a DataSet) send the modified rows to
the database layer. If using O/R mapper maybe check the IsDirty field.

Anders, Denmark




Applevalley01 09-27-2004 03:55 AM

Re: Datagrid batch update
 
Could you please send me some sample code for the same, more specifically how
to send the modified rows to the database ?

Thanks in advance

"Flare" wrote:

> >I have created an excel like grid where the grid defaults to edit mode when
> > it is renderered. But I would like a way to perform a batch update since I
> > am
> > dealing with 10000 rows in the grid. I do not want to make a roundtrip to
> > the
> > database for each row that was modified. I would appreciate it if someone
> > can
> > help me with that.

>
> Save to datasource to eg the Session["MyTempDataSource"] = MyDataSource;
>
> And when you rebind your datagrid in OnUpdate you use the datasoource in
> session. Then you can (if you are using a DataSet) send the modified rows to
> the database layer. If using O/R mapper maybe check the IsDirty field.
>
> Anders, Denmark
>
>
>
>


Rahul A Mehta 12-28-2004 06:59 AM

Re: Datagrid batch update
 
Hi ,
Inorder to save round trip to servers u must go for DataAdaptor.Update()
The DataAdaptor provides this facilty inorder to avoid round trips to server
the dataAdaptor.Update can be used with inserts,deletes and updates all
which are performed on data set and make changes to database in1 short.

da.Update(datasetname,"tablename")

Happy Coding.

Regards,
Mehta Rahul


"Flare" wrote:

> >I have created an excel like grid where the grid defaults to edit mode when
> > it is renderered. But I would like a way to perform a batch update since I
> > am
> > dealing with 10000 rows in the grid. I do not want to make a roundtrip to
> > the
> > database for each row that was modified. I would appreciate it if someone
> > can
> > help me with that.

>
> Save to datasource to eg the Session["MyTempDataSource"] = MyDataSource;
>
> And when you rebind your datagrid in OnUpdate you use the datasoource in
> session. Then you can (if you are using a DataSet) send the modified rows to
> the database layer. If using O/R mapper maybe check the IsDirty field.
>
> Anders, Denmark
>
>
>
>



All times are GMT. The time now is 02:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57