By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,516 Members | 1,369 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,516 IT Pros & Developers. It's quick & easy.

Updating Datagrid from outside datagrid

P: n/a
I am trying to update a DataGrid where I want to rebind just the row that
was updated.
Here's the situation:
1) Updating is not a problem, it works fine.
2) I am not using ItemCommand (edit, delete, etc)
3) the button that issues the update/rebind is outside the datagrid, on the
web form.

Till now I have been issuing a full DataBind for the entire DG, that I read
as an Arraylist. But i would like to rebind only the row that was affected.
I looked into DataGridItem but how can I bind a DataSource to a DGitem?

here's a code snippet of how i do it now:

Order.UpdateOrder(int.Parse(lblOrderID.Text), txtWaybill.Text,
int.Parse(ddServices.SelectedValue), shippID, receivID, billtoid, );

ArrayList waybills = neworder.GetWaybills();

dgOrder.DataSource = waybills;


Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

Databind apply to all grid rows but,

You can update row data on client side using DHTML and update DB using
your page, by using hidden iframe or XMLHttpRequest (depend on client
type) to call your page.

HttpRequest or iframe should hold client side form and then submit it to

Your button should:
1) generate update request to server (using HttpRequest or iframe)
2) check return value and if it OK
3) use dhtml to update client side table.

Natty Gur[MVP]

blog :
Mobile: +972-(0)58-888377
*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.