User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: May 2005
Posts: 13
Reputation: earlofroberts is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
earlofroberts earlofroberts is offline Offline
Newbie Poster

RowDelelting Event

  #1  
Dec 5th, 2007
i need a code sample to capture the value of a record id from the selected row so that i can send it as a parameter to the oracle procedure that deletes the record.

thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Rep Power: 11
Solved Threads: 102
Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: RowDelelting Event

  #2  
Dec 7th, 2007
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
Alex Cavnar, aka alc6379
Reply With Quote  
Join Date: Sep 2007
Posts: 17
Reputation: viswa_007 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 3
viswa_007's Avatar
viswa_007 viswa_007 is offline Offline
Newbie Poster

Re: RowDelelting Event

  #3  
Dec 7th, 2007
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 9:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC