473,549 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ 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 10965
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.Update Command event. In this event, you can get all the updated
values in this row, and update the underlying dataset(datatab le)

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/vbtchTopQuestio nsAboutASPNETDa taGridServerCon trol.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.mi crosoft.com> wrote in message
news:0t******** ******@cpmsftng xa10.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.Update Command event. In this event, you can get all the updated
values in this row, and update the underlying dataset(datatab le)

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/vbtchTopQuestio nsAboutASPNETDa taGridServerCon trol.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
5279
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 data for the record I load. So then I change the contents of one of the textboxes and click on the Save button. The button's event handler then calls...
2
1354
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 how do i get the changes into the database
3
1790
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 information to another object which forms an SQL query and makes the query to the DB (actually to a DBFacade object). In any case, please see the code...
5
1529
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 car info in it. The grid is bound to a datatable called dtAutos. The grid includes make, model, year. The
14
2109
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 grid and write to the database and I set the new Primary Keys and related Fields to the new asigned atuonumbers in the Access.
10
4934
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 the column order of the datatable). I also allow the user to click on a column header to sort the datagrid by that column. I need to identify...
2
13943
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
2629
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 maybe go so far as to build an UPDATE or INSERT query with a couple parameters and just execute it against the database. Currently, this is all done...
0
1462
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 through the selected rows and sets a check box field in the datagrid (and thus the databound datatable) to checked/true. It works like this: Dim cel...
0
7457
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7483
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7817
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5092
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3487
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1949
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 we have to send another system
1
1063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
771
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.