2 dropdownboxes and datagrib

  • Thread starter Thread starter Tony WONG
  • Start date Start date
T

Tony WONG

1st dropdown box is main category

when 1st dropdown box is clicked, 2nd dropdown box list the sub category

when 2nd dropdown box is clicked, the datagrib show the data according it
2nd dropdown box

it works to some extent by "human clicks".

however, when i click 1st dropdown box, 2nd dropdown changed but datagrib
not changed.

If i click 1st dropdown, so that 2nd dropdown will be triggered to change
"by code".

How can i do? Then datagrib can be changed!

Thanks a lot.

tony
 
Hi Tony,

It is as simple as you did with 2 dropdownlists.
You must have written a code in "dropdownlist1_selectedindexchanged" 2
change 2nd dropdownlist. Like that you can call the datagrid bind
function in "dropdownlist2_selectedindexchanged".


Regards,
Mansi Shah.
 
Hi Mansi

Thanks for your reply

i did not write any code on the dropdownlist. i just bind them to data
source objects.
The datagrid can be refreshed by "MANUAL click" on 2nd dropdownlist

my problem is
when i click 1st dropdownlist, then it fires to 2nd dropdownlist, but the
datagrid is not updated

what should i do? grateful for any hints?

tony
 
Hi,

As per my knowledge, if you want to refresh the datagrid as per some
value(like dropdownlist in your case), you have to write some condition
or code for that. And you have to bind the datagrid by datasource in
your .cs or .vb file.

It would be gr8 if you can send me your code, where you have bind the
lists and grid.

Regards,
Mansi Shah.
 
Back
Top