Click here to Skip to main content
16,019,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in my page i have one drop(drpstatus) down with list
Assigned
holding
waiting
on same page i have one grid and in that grid i have one dropdown(drpaction) as a item
template with same list..
now i want if i select any value from drpstatus e.g.holding then grid shows me records related to that
but i want drpaction should show me same value as selected i.e.holding and so on
Posted
Comments
Sunasara Imdadhusen 21-Sep-10 7:51am    
Please send me little bit of code
eslam soliman 21-Sep-10 8:55am    
i cant understand you problem is it that you want to filter a ddl in the grid by selectting a value from the other ddl ,can you be more clear please.

1 solution

Hi,

From what I understand you are looking for the SelectedIndex property of the ComboBox class. What you can do is handle the SelectedIndexChanged event of the drpstatus. In that event handler, you need the following code:

private void drpstatusSelectedIndex_Changed(object sender, EventArgs e)
{
  // the combo box that raised the event
  ComboBox cb = (ComboBox)sender;

  drpaction.SelectedIndex = cb.SelectedIndex;
}


Hope this is what your after :)

Dave
 
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