473,405 Members | 2,300 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,405 software developers and data experts.

C#, grid and databinding

Hi,

Let's say that I bind a grid to a dataset populated from the content of
a DB table.

1- Does this grid will be updated if the content of the DB table is
modified?

2- Does DB table content can be modified by the grid content?

Thanks!
Marty
Jan 3 '06 #1
2 2649
Neither of these will happen for you - how could they? You bound that data
to a dataset - this is just whatever you retrieved from the database. But, a
dataset is just some rows/columns - it doesn't have to come from a database,
it doesn't know how it got populated, from what data source, how it can
update the data source, etc. The dataset could have been returned from a
web service, or populated manually, etc - there is no way for the dataset to
figure out where and how it should update when the user changes something on
the grid bound to the dataset. There is also no way for the dataset to
somehow monitor the database automatically waiting for changes - not to
mention all the possible problems you could have if the user updated a row
in the grid that now got updated in the database, and how to resolve this.

The list of reasons why this could never just happen automatically goes on
and on...

"Marty" <xm******@hotmail.com> wrote in message
news:roAuf.29769$m05.14240@clgrps12...
Hi,

Let's say that I bind a grid to a dataset populated from the content of a
DB table.

1- Does this grid will be updated if the content of the DB table is
modified?

2- Does DB table content can be modified by the grid content?

Thanks!
Marty

Jan 3 '06 #2
Hi Marina,

Thank you for your reply. I should have ask, "what is the best way to
do it?" :)

Do you have a link or tutorial I could read on the subject?

Thank you!
Marty


Marina wrote:
Neither of these will happen for you - how could they? You bound that data
to a dataset - this is just whatever you retrieved from the database. But, a
dataset is just some rows/columns - it doesn't have to come from a database,
it doesn't know how it got populated, from what data source, how it can
update the data source, etc. The dataset could have been returned from a
web service, or populated manually, etc - there is no way for the dataset to
figure out where and how it should update when the user changes something on
the grid bound to the dataset. There is also no way for the dataset to
somehow monitor the database automatically waiting for changes - not to
mention all the possible problems you could have if the user updated a row
in the grid that now got updated in the database, and how to resolve this.

The list of reasons why this could never just happen automatically goes on
and on...

"Marty" <xm******@hotmail.com> wrote in message
news:roAuf.29769$m05.14240@clgrps12...
Hi,

Let's say that I bind a grid to a dataset populated from the content of a
DB table.

1- Does this grid will be updated if the content of the DB table is
modified?

2- Does DB table content can be modified by the grid content?

Thanks!
Marty


Jan 3 '06 #3

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

Similar topics

1
by: kk | last post by:
I have 2 issues, please help ! 1st issue : -------------------------------------------------------- Loading Grid ------------ 1) creating new rows in a datatable and adding data a array...
5
by: sdbranum | last post by:
I have been using Visual C#.NET to code a large project having many data adapters, data sets, datagrids, multiple forms with tab pages, each containing various controls (mostly label, text boxes,...
2
by: Kenneth | last post by:
Hi, I want to make sure I got the easiest way on how to bind a grid's datasource to a datatable. I've made an in-memory datatable Dim dtTotal As DataTable Dim drow As DataRow dtTotal = New...
0
by: Simon | last post by:
I've created several columns at run time and added these to my datagrid using the following: Select Case templateType Case ListItemType.Header lc = New Literal lc.Text = "<B>" & columnName &...
3
by: Sivaprasad | last post by:
Hello, Can anybody suggest me, which is the best grid that can be used in ASP.Net. The main functionality I'm looking for is I shoud be able to do heirarchical view of data. Need to do a row...
1
by: larry mckay | last post by:
Hi, I'd like to use a datagrid with a 1. most grid's use SQL data adapters as a datasource. I'd like to use a parametrized query into a stored procedure (specifically a sqldatareader)...
4
by: Atley | last post by:
I am using VB.net Ent Arch 2003. I have a dataset that was made through the wizard to create a Windows Data Form I have a DataGrid to show/edit the table from my DataSet. I want to: Be...
3
by: vineetbatta | last post by:
I have Custom Data class which stores data about single customer and then i store that customer objects in arraylist as shown below. Customer custdata = null; // Custom Data class for 1 customer...
2
by: Roger Frei | last post by:
Hello ng, I have a datagrid that is bound to a datasource. That works good so far. Now I want to add another column to my grid dynamically. That also works good until the first postback. The...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...

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.