473,387 Members | 3,033 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,387 software developers and data experts.

DataGrid, DataSet, GetChanges question

In winforms, I can bind a datagrid to a dataset. When the user wants to
submit changes, it's easy to see what has changed with the DataSet
"GetChanges" method.

In ASP.Net, I can create the dataset, bind it to the grid, then send to
the user. But upon postback, I have no way of knowing which items
changed on the datagrid. Do I really have to roll my own code for this
or is it possible to use the GetChanges method on the dataset after
all? Thanks --Marty

Nov 19 '05 #1
1 2325
Hi Marty,

Due to client-server mode, a web application can't tightly
bind a datagrid with its underlying data source. Hence
once postback, you need to get data from datagrid itself,
e.g. datagrid.Items[rowIndex].Cells[colIndex].Text. There
is no way to use GetChanges on it's underlying dataset.

HTH

Elton Wang
el********@hotmail.com

-----Original Message-----
In winforms, I can bind a datagrid to a dataset. When the user wants tosubmit changes, it's easy to see what has changed with the DataSet"GetChanges" method.

In ASP.Net, I can create the dataset, bind it to the grid, then send tothe user. But upon postback, I have no way of knowing which itemschanged on the datagrid. Do I really have to roll my own code for thisor is it possible to use the GetChanges method on the dataset afterall? Thanks --Marty

.

Nov 19 '05 #2

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

Similar topics

6
by: BFX | last post by:
Hi All, I have datagrid with binding on dataset this.grdMachineType.DataMember = "MachineTypes"; this.grdMachineType.DataSource = this.dsMachineTypes; After append new row in datagrid i...
1
by: Paul | last post by:
I am writing a DataBase Client/Server pair of applications in C#. The client registers a query, the server populates a dataset and its contents sent via XML to be displayed in the client DataGrid....
0
by: TK | last post by:
Hi, I need help on datagrid. I have a dataset exposed as a webservice. I do have a web application that is supposed to consume the service on a datagrid.
4
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. ...
7
by: uiranejeb | last post by:
Hi everybody, I am an asp.net datagrid that have all the rows editable. An user can update any column from datagrid. I'm trying to find a way to update only the rows that were updated. How can...
12
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they...
3
by: AH | last post by:
Hi all, I noticed this strange behavior; I created a new control (example inherits from textbox) and add a new property, then I bind this new property to a field in my dataTable in a dataSet....
2
by: Brian Hoops | last post by:
I have a windows forms datagrid and I would like to be able to recognize when changes have been made in order to perform the update. I tried the following, which works well, but only if the user...
3
by: John Sheppard | last post by:
Hello there, I have the following code; I do this as a work around for a dataset.haschanges method which doesnt appear to work correctly either For Each dt As DataTable In myDs.Tables If Not...
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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.