Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing bound value from listview to function

Status
Not open for further replies.

stinkybee

Programmer
May 15, 2001
218
GB
Ok, this is a really simple problem but I can't find out how to do it.

I need to pass a bound value from the edititemtemplate to a function that is called onitemediting. Basically I need the text of a label to use in a function. I'm using C# by the way.
 
I'll try again with this to see if I can get an answer.

So I have a listview that is bound to a datasource. When the user clicks the edit button for one of the records I want to pass one the values bound to the edititem template to a function.

The function is called onitemediting.

The overall aim with this will be to automatically select items in a checkboxlist that is in the edititem template. To do this I need to pass the ID value of the record to a function that opens a sql connection using the ID. I can then pre select any of the items necessary in the checkboxlist.

As I say, I am only struggling with passing this ID value to my function.

Any help on this would be greatly appreciated.

 
I found the answer to this problem. Basically I can't gain access to the controls in the edititem template through the onitemEditing event so I used the onItemDataBound event instead which works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top