473,414 Members | 1,878 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,414 software developers and data experts.

HowTo: retrieve a datarow in the dataGrid update handler

How can I retrieve a DataRow from the DataGrid in the update handler?
Can I do this or do I need to construct one?
Nov 18 '05 #1
3 1461
Alex wrote:
How can I retrieve a DataRow from the DataGrid in the update handler?
Can I do this or do I need to construct one?


Alex, what you do is grab the value in the DataGrid. How you get the
value for a particular column of the updated row depends on if the row
is a BoundColumn or a TemplateColumn. Examples for both types of
columns can be seen here:

http://datawebcontrols.com/faqs/Prog...Contents.shtml
http://datawebcontrols.com/faqs/Prog...Contents.shtml

Happy Programming!

--

Scott Mitchell
mi******@4guysfromrolla.com
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
Nov 18 '05 #2
If your datagrid is bound to a datatable, use e.item.datasetindex to get the
row index, then retrieve the data from that row in the datatable.

"Alex" <no****@nospam.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
How can I retrieve a DataRow from the DataGrid in the update handler?
Can I do this or do I need to construct one?

Nov 18 '05 #3
Is there a way to directly get an entire DataRow out of the grid?

e.g. DataRow x = ???DataGrid??? [e.Item.DataSetIndex]

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:Op**************@TK2MSFTNGP11.phx.gbl...
If your datagrid is bound to a datatable, use e.item.datasetindex to get the row index, then retrieve the data from that row in the datatable.

"Alex" <no****@nospam.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
How can I retrieve a DataRow from the DataGrid in the update handler?
Can I do this or do I need to construct one?


Nov 18 '05 #4

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

Similar topics

3
by: Phil | last post by:
Hi, I have a client/server app. that uses a windows service for the server and asp.net web pages for the client side. My server class has 3 methods that Fill, Add a new record and Update a record....
4
by: CaptRR | last post by:
I think this is the right group to post to, so here goes. My problem is this, I cannot update the datarow to save my life. Been on this for 2 days now, and still am no closer to figuring it out...
2
by: Torben Jensen | last post by:
Hi, Does anyone have experience in retrieveing useraccount information like eg. name, lastname, phonenumber, adress etc from Active Directory from an asp.net application? Perhaps standard...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
7
by: Dan Sikorsky | last post by:
How do you iterate thru a dataset to change money fields to a different value? Here's what I have. My dataset is filled directly from a stored procedure. ' Create Instance of Connection and...
10
by: Rich | last post by:
Greetings, Just starting out with .net. I have a vb.net app where I connect to an Access mdb. I use a connection component from the tool box (conn1), a data adapter component from the toolbox...
5
by: rn5a | last post by:
The .NET 2.0 documentation states the following: When using a DataSet or DataTable in conjunction with a DataAdapter & a relational data source, use the Delete method of the DataRow to remove...
2
by: rn5a | last post by:
When a DataGrid is in the editable mode, users can change the quantity of the items that are currently in his shopping cart by entering a new quantity in a TextBox. After changing the quantity, a...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...
0
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...

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.