473,693 Members | 2,766 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2662
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******@hotma il.com> wrote in message
news:roAuf.2976 9$m05.14240@clg rps12...
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******@hotma il.com> wrote in message
news:roAuf.2976 9$m05.14240@clg rps12...
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
2061
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 list to datatable.
5
2373
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, check boxes, date pickers, combo boxes and datagrids). I have been coding alone on this project for about a year, and I have experienced many problems which have not been addressed by various SP's, including the recent SP1 to Framework.NET 1.1,...
2
2068
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 DataTable("Total") ' Add two columns
0
1162
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 & "</B>" container.Controls.Add(lc) Case ListItemType.Item myLabel = New Label
3
1392
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 merge and column merge. And i dont' want to bind to anything. Similar to Video flex grid ( Now component one)
1
1793
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) instead of using the data adapter. does anyone have any code samples that will do this? I'm looking for gridname.datasource = mydatareader (if this is possible) where the sqldata reader returns a result set from a parametrized stored
4
1060
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 able to choose the subset of data from the table and then have that
3
9571
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 data. ArrayList ar = new ArrayList(); // To store more than one customer object. for (int x = 0; x < 30; x++) { custdata = new Customer();
2
1832
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 column is still there but for some reason its content is empty. I added the code underneath this post. The problem is that the delegate CreateCellTemplate is not called anymore. But why? I can't understand.. :-( Viewstate is enabled for the grid. ...
0
8971
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8812
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7647
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6479
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5825
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4332
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2992
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
2
2248
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1970
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.