473,467 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

updating datatable with datagrid changes

How can I update the datatable with the datagrid values after the datagrid
itself has been modified.? I assume it's not automatically done.

Thanks.
Nov 16 '05 #1
4 10956
Hi Angel,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #2
Hi Angel,

Is your datagrid winform or webform based?

Based on my understanding, you want to update the datatable when datagrid
value has been changed.

In windows form datagrid, the databinding is a two way binding, if the
value in the datagrid is changed, the underlying datasource is also
updated. For more information, please refer to:
http://www.codeproject.com/vb/net/da...ngconcepts.asp

For webform, the databinding is one way, that is: you can only populate the
datasource to the datagrid. But the datasource does not know the change of
datagrid. This is because of the state-less of HTTP.

Normally, for webform datagrid, you may make certain row into edit mode,
then after editing, you should fire an event, such as
datagrid.UpdateCommand event. In this event, you can get all the updated
values in this row, and update the underlying dataset(datatable)

For more information, please refer to "Editing Multiple Rows At Once"
section in below article
http://msdn.microsoft.com/library/de...us/dv_vstechar
t/html/vbtchTopQuestionsAboutASPNETDataGridServerControl. asp

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #3
The datagrid is in a windows form. So I do not have to take any additional
steps since it's automatic.

Thanks.
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:0t**************@cpmsftngxa10.phx.gbl...
Hi Angel,

Is your datagrid winform or webform based?

Based on my understanding, you want to update the datatable when datagrid
value has been changed.

In windows form datagrid, the databinding is a two way binding, if the
value in the datagrid is changed, the underlying datasource is also
updated. For more information, please refer to:
http://www.codeproject.com/vb/net/da...ngconcepts.asp

For webform, the databinding is one way, that is: you can only populate the datasource to the datagrid. But the datasource does not know the change of
datagrid. This is because of the state-less of HTTP.

Normally, for webform datagrid, you may make certain row into edit mode,
then after editing, you should fire an event, such as
datagrid.UpdateCommand event. In this event, you can get all the updated
values in this row, and update the underlying dataset(datatable)

For more information, please refer to "Editing Multiple Rows At Once"
section in below article
http://msdn.microsoft.com/library/de...us/dv_vstechar t/html/vbtchTopQuestionsAboutASPNETDataGridServerControl. asp

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #4
Hi Angel,

Thanks for your feedback.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sandman | last post by:
I've got a simple windows form with some bound textboxes and Save button. Each texbox is bound to column in a table in an Access database. The form fills fine - all the fields show the correct...
2
by: Geir Sanne | last post by:
hi!! how am i supposed to update the db witht he changes the user make in webpage am trying to make a simple page that have a grid bound to a table the user can delete,add or update the grid...
3
by: Jon Agiato | last post by:
Hi, I am trying to use a data grid in a web application in which I have three tiers. The DataGrid is not set up to a data source, or a data adapter, so everytime I make a change I send the cell...
5
by: sparkle | last post by:
Hi, I'm having a problem getting data into my db using datatable and commandbuilder. The 'cars' table in my sql server holds: employeeID, carID, make, model, year. I have a datagrid with...
14
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's workning nice. My problem is when I Update these...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
2
by: susan.f.barrett | last post by:
Hi, Despite me being able to type the following in to SQL Server and it updating 1 row: > updatestockcategory 1093, 839 In my code, it is not updating any rows. dataSet = new DataSet();
7
by: David P. Donahue | last post by:
My experience with databases using C# has been pretty limited thus far. Mostly I just use a SELECT statement to populate a DataSet, which is just read-only (mostly for display on a web page), or...
0
by: Chet | last post by:
I have a Datagrid that is bound to a Datatable at runtime. I allow the user to select a number of rows using the mouse and then click a button that says "check selected rows", which then cycles...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.