i am facing few problems of using dropdown list.
there is a dropdownlist with few items like:- all,abc,def,xyz
my problem is that by default whenever page loads, it shows record for "all", but whenever i just select other item say "abc" or "xyz"; it does not display its respective records in gridview. i just want to select any other item from dropdown and it should have to display its respective record without clicking any button.
and 1 more thing, when the data will display according to dropdown item selection; i can perform edit/delete/add operation only there in gridview.
so please tell me the solution.
thank you.


Abhijit baruaRank #3,722 · 397 reputationPosted Aug 13, 2012, 2:15 AM EDT
if(!IsPostBack)
{
populate dropdownlist
}
at page load
Nattudurai EswaramurthyRank #5,536 · 296 reputationPosted Aug 13, 2012, 2:31 AM EDT
The problem is when ever the page loads, ur drpdown list control fills the data again in Page load.
Use the following code:
if(!IsPostBack)
{
mydropdownlist.datasource = Soure;
}
this above statement prevent u from loading data to ur drpdown list.
Hope this will resolve ur issue
Priyank Khare154 reputationPosted Aug 13, 2012, 2:37 AM EDT
yes i am using:-
if(!IsPostBack)
{
populate dropdownlist
}
at page load
i am sending you my code:-
please help me to solve my problem.
thank you