471,603 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,603 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 2585
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by kk | last post: by
3 posts views Thread by Sivaprasad | last post: by
3 posts views Thread by vineetbatta | last post: by
2 posts views Thread by Roger Frei | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

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.