•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 455,987 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,781 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 368 | Replies: 2
![]() |
•
•
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation:
Rep Power: 11
Solved Threads: 102
What do you have so far? How much do you know about the underlying DataRowView model to a GridView?
http://msdn2.microsoft.com/en-us/lib...wdeleting.aspx
The trick is when the event triggers, it will return a DataRowView that you can pull data from. You just have to figure out the column you want.
This page should provide some insight if you view the source via the link at the bottom of the page:
http://authors.aspalliance.com/aspxt...wdeleting.aspx
http://msdn2.microsoft.com/en-us/lib...wdeleting.aspx
The trick is when the event triggers, it will return a DataRowView that you can pull data from. You just have to figure out the column you want.
This page should provide some insight if you view the source via the link at the bottom of the page:
http://authors.aspalliance.com/aspxt...wdeleting.aspx
Alex Cavnar, aka alc6379
if ur control is a grid view then the code to capture the selected row's id in a string is:
string str = GridView1.SelectedDataKey.Value.Tostring()
Note: Set the Datakeyname from the propertiers of the GridView control to your table's id name and then write the above line of code in gridview's selectedindex change event
string str = GridView1.SelectedDataKey.Value.Tostring()
Note: Set the Datakeyname from the propertiers of the GridView control to your table's id name and then write the above line of code in gridview's selectedindex change event
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Hi guys please clear my doubt.
- Next Thread: Session_OnEnd , Session_End , or Timeout help



Linear Mode