473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C# Windows Form DataGrid and DataTable

Hi,

I have a DataGrid DataGrid1 in my C# Windows Form MyForm.
The DataGrid1 uses DataTable as it's DataSource in the run time.
Now that I have Column1 and Column2 and 2 DataRows in MyDataTable.
How do I do to let the DataTable updated saying that I changed the
DataGrid1's value?
Thanks for help.
Jason
Dec 3 '05 #1
1 2409
Actually with a bound Winforms DataGrid, if a user makes a change or adds a
row using the actual grid UI, I believe the underlying datasource is updated
as part of this process. if you need an event, look at the RowChanged and
similar events of the DataTable class
-- Peter
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jason Huang" wrote:
Hi,

I have a DataGrid DataGrid1 in my C# Windows Form MyForm.
The DataGrid1 uses DataTable as it's DataSource in the run time.
Now that I have Column1 and Column2 and 2 DataRows in MyDataTable.
How do I do to let the DataTable updated saying that I changed the
DataGrid1's value?
Thanks for help.
Jason

Dec 3 '05 #2

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

Similar topics

3
by: PAUL EDWARDS | last post by:
I have a windows form that is bound to a datatable. In VB6 I could just update the field contents and it would be updated in the database, however if I update the text property of the control from...
3
by: Arjen | last post by:
Hello, I have a hash table... some results from it I like to see in a windows form. Which component must I use? Users may select one item in the "list" (from the hash table)... How can I see...
3
by: scott | last post by:
hi all, hope some one can help iv created a datagrid that points to a DataView. the data view takes in a DataTable. The DataTable then adds the columns using DataColumn. All fine so far. ...
1
by: Richard | last post by:
Hello MyMainWebPage.aspx contains MyUserControl.ascx MyUserControl.ascx has a DataTable Property MyDataTable
8
by: Inigo Jimenez | last post by:
I have an ASP .net web application installed in a Windows 2003 server. This web application has a webform that has a Datagrid. This Datagrid is filled with the data of a SQL table. I have a...
6
by: Fred Morrison | last post by:
1. No Columns collection. 2. No ability to easily synchronize the underlying DataTable of a DataGrid when a row is deleted in the Grid. Once you sort (via the column headers) all bets are off as...
4
by: Dany P. Wu | last post by:
Hi everyone, I'm not entirely sure if this is the best way of going about it, but here's the scenario.......... I have two datagrid, each bound to a datatable which have checkbox columns....
1
by: seanmle | last post by:
I want to build a windows application that has a datagrid filled with data. When a person modifies information on a single cell, it updates the database without the user having to click on a save...
2
by: benfly08 | last post by:
Hi, everyone. I got a weird problem for my C# program. In my program, I use a DataGrid to display data. I bind the DataGrid to a DataTable. I made all the cells in DataGrid ReadOnly as True. So...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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...

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.