Solved

Urgent: How to delete a record from a Gridview, passing the UNID of the record to a WEB Service method

Posted on 2006-10-19
3
570 Views
Last Modified: 2008-02-07
I need some urgent help in ASP.NET/C# (VS 2005)

I have a gridview, I've created a template column, the column itself displays the word DELETE. I have a WEBService called deletePage(string unid). How do I pass the unid of the record into the WEBService when a user clicks on it?

Thanks
0
Comment
Question by:mousemat24
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
nauman_ahmed earned 500 total points
ID: 17766357
First you will need to generate the proxy class for your web service or in other words add reference to the web service in your project. Then on the Delete event, call the web service method to delete and rebind the grid.

--Nauman.
0
 

Author Comment

by:mousemat24
ID: 17766438
nauman_ahmed
I have a proxy class, but I dont know how to get the UNID of the record. This is what I have

TITLE    UPDATED BY     EDIT    DELETE  (Gridview1 columns)

In the delete column, I want to get the UNID of the record and pass that to a web service

hope that makes sense?
Thanks nauman_ahmed
0
 

Author Comment

by:mousemat24
ID: 17767328
Hi nauman_ahmed

I've got the delete to work, but I keep getting the following error

Deleting is not supported by ObjectDataSource 'objHandBook' unless the DeleteMethod is specified.

Any idea how I'm supposed to sort this out?

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now