Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using 2 dropdownboxes in one grid view like( name(textbox) , state(ddb1),city(ddb2))
now by changing the value of ddb 1,i want to change the values of ddb2,
i written code in onselectchanged event of ddb1,In this event i can access ddb1 by
code "DropDownList d = (DropDownList)sender;"
but i cant access ddb2 inside ddb1_selectindexchanged event
help me..........
Posted

1 solution

if a control in a grid row fires an event it should, or you can make it, fire the grids item command. Inside the itemcommand event you have access to the dataItem in the event args which you can use to go find the other control on the row and do whatever you want to it. I dont recall the event order off the top of my head, but you should be able to handle both events in itemCommand by specifying a CommandName or CommandArgument on the control. I've been working with Java and Android for the past couple months, so the details may be slightly wrong but it should get you going in the right direction. Or if you know what the row index is you can use the gridviews row collection and its column collection to get to the other dropdown.
 
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