By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,636 Members | 1,814 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,636 IT Pros & Developers. It's quick & easy.

HowTo: retrieve a datarow in the dataGrid update handler

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.