474,034 Members | 2,045 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c# datagrid updating

I am writing SQL enterprise type application in c# and allowing ht user to
execute queries, etc. The results are displayed in a grid using data
adapteres, etc. Do I really have to write routines to create the Update
queries for the adapter in order for the grid to be updated, etc. I suppose
I'm spoiled by having used delphi where I just slap stuff on a form and it
does most of the work for me.

Are data grids in c# really that convoluted or am I missign something?
Nov 17 '05 #1
2 1315
Hi Tim ,

What i think is there are two ways to go about doing this :

1. You can have Update Buttons in your Grid , as one of the column and
user locally update the stuff in to the grid , by making it editable and
on committing , update the Dataset and finally db .

2. Another one is the harder way of first updating the db , refreshing
the dataset then and re binding the grid .

Since , i have not worked on delphi so can't comment , but invariably in
this case u need to writes methods to accomplish the task .

- Mrinal

Tim Bird wrote:
I am writing SQL enterprise type application in c# and allowing ht user to
execute queries, etc. The results are displayed in a grid using data
adapteres, etc. Do I really have to write routines to create the Update
queries for the adapter in order for the grid to be updated, etc. I suppose
I'm spoiled by having used delphi where I just slap stuff on a form and it
does most of the work for me.

Are data grids in c# really that convoluted or am I missign something?

Nov 17 '05 #2
Thanks for your reply. Basically Delphi spoilt you by handling all the work
for you. You have to do it yourself in c# as I have figured out and you say.
Oh well....
"Mrinal Kamboj" <mr***********@ oracle.com> wrote in message
news:zR******** ****@news.oracl e.com...
Hi Tim ,

What i think is there are two ways to go about doing this :

1. You can have Update Buttons in your Grid , as one of the column and
user locally update the stuff in to the grid , by making it editable and
on committing , update the Dataset and finally db .

2. Another one is the harder way of first updating the db , refreshing the
dataset then and re binding the grid .

Since , i have not worked on delphi so can't comment , but invariably in
this case u need to writes methods to accomplish the task .

- Mrinal

Tim Bird wrote:
I am writing SQL enterprise type application in c# and allowing ht user
to execute queries, etc. The results are displayed in a grid using data
adapteres, etc. Do I really have to write routines to create the Update
queries for the adapter in order for the grid to be updated, etc. I
suppose I'm spoiled by having used delphi where I just slap stuff on a
form and it does most of the work for me.

Are data grids in c# really that convoluted or am I missign something?

Nov 17 '05 #3

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

Similar topics

0
1310
by: cwbp17 | last post by:
Have two tables that have a FK relationship on ID column. Have one datagrid that displays all of the columns of both tables. What's the best approach on updating a row from the datagrid back to the database? I've used the following code for the DataGird1_UpdateCommand Option1
2
7839
by: Stephan Steiner | last post by:
Hi I'm using several DataTables in my program which are updated periodically. At the same I have those tables bound to DataGrids in my GUI. So far I've been doing all the processing in the same program and the speed of the processing prevented any issues when it comes to updating the GUI elements (as DataTables are changed this triggers updates in the DataGrids), but as soon as I add cpu time intensive processing options (i.e. receiving...
2
10020
by: Jim | last post by:
In my Win App, I have a datagrid that's bound to a dataset. When the form loads, the datagrid fills. How can I add an empty row to the end of the datagrid during a button click (similar to pressing Tab when mouse pointer is on last field of last record of datagrid)? The datagrid's read-only so the user won't be able to modify it unless he wants to add a new record via the datagrid (by adding the empty row). Also, if I modify the...
7
4874
by: Brian Conway | last post by:
Can anyone give me an example of how I can loop through a datagrid and have it run a stored procedure each time it loops?
4
5379
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. Currently everything is working. I can find the updated rows/columns by parsing the posted data collection against the DataGrid DataSource. However, when there is a large amount of DataGridItems (rows) the update processing can take a while. ...
3
4906
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
5
2054
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated one row, all of them were updated so i immediatelly figured out that i have to include the id of every entry in the update statement. This is where the problem is raised. My database is an Access database. The table i am updating contains a Date...
0
920
by: cwbp17 | last post by:
Have two oracle tables that have a FK relationship on ID column. Have one datagrid that displays all of the columns of both tables. What's the best approach on updating a row from the datagrid back to the database? I've used the following code for the DataGird1_UpdateCommand Option1
0
1656
by: cwbp17 | last post by:
I'm having trouble updating individual datagrid cells. Have two tables car_master (columns include Car_ID, YEAR,VEHICLE) and car_detail (columns include Car_ID,PRICE,MILEAGE,and BODY);both tables have a FK relationship on CAR_ID so the oracledataadapter1 select statement(CommandText) is: select car_master.car_id, car_master.year,car_master.vehicle,car_detail.car_id AS EXPR1,
2
1684
by: Greg | last post by:
I'm using the Framework 1.1, so I don't have access to the new DataGridView object. What I'm wondering is, is there a really simple way to bind a plain datagrid to a database in such a way that changes made to cells in the datagrid call an update on the corresoonding data within a database? I've looked in vain for a really simple way to do this with minimal coding, but I'm coming to the conclusion that I will have to trap the events of...
0
10322
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
12102
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11586
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...
1
11964
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
11117
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
10282
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...
0
7842
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
6798
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3945
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.