Groups | Blog | Home
all groups > asp.net datagrid control > july 2006 >

asp.net datagrid control : How to get active row??


JLuv
7/13/2006 9:12:13 AM
I have a TemplateColumn in my DataGrid that consists of links. When the
links are clicked a javascript calendar is opened that returns a
selected date to a HiddenField. What I'm trying to do is take the row
in which the calendar was chosen and change the date inside of the
datagrid. (if that makes sense)
I know how to use "this.myGrid.Items[row].Cells[column]" to access
datagrid info, but i don't know how i would be able to tell my web app
which row was clicked.
I'm using C# ASP.NET, btw.
Any help? If this isn't enough info, plz let me know.
JLuv
7/13/2006 9:16:03 AM
Ok, maybe a better way to put this...I want to know which row the link
was clicked on.
Then from there, I would know the row/column combination to use so that
I can change the correct date.

[quoted text, click to view]
JLuv
7/13/2006 1:39:58 PM
ok, i found a solution. i ended up using an EditCommandColumn that i
found in the following article.
http://samples.gotdotnet.com/quickstart/aspplus/doc/webdataaccess.aspx

[quoted text, click to view]
venkat.oar NO[at]SPAM gmail.com
7/14/2006 7:16:58 AM
JLuv,

Try using Datagrid1_itemCreated

--Venkat
[quoted text, click to view]
AddThis Social Bookmark Button