Click here to Skip to main content
15,914,074 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 2 datalist

child datalist is binding based on parent datalist value(categoryid).That i have done in parent datalist itemdatabound.

now the issue is on child datalist editcommand ,after e.edititemindex i need to bind child datalist.for that i need parent datalist value(categoryid).

I have no idea how to get this....

do u have any suggestions?
Posted
Updated 3-Mar-10 1:47am
v2

Easiest would be to fetch Parent-CategoryId along with other values of child datalist and keep it as hidden while display. This would need small change in query and little change while display.

This way you will always have parent value at the selection of child record with other child row values.
 
Share this answer
 
v2
Thank u for replay.yes i have done like that.

put one hidden filed in child datalist and one in parent

Bind parent hidden filed value as usual using Eval and

then on child datalist itemdatabound,assigned that hidden field value to child datalist hidden field

Now i got the value...

Thanks
 
Share this answer
 
@hygeenams

i am trying to find the parent datakey associated in child datalist so that i can use it in child datalist but can implement ur way.plase help with codes.i want to get the parent datakey value when child datalist edit command button is clicked.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900