Click here to Skip to main content
15,921,716 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
protected void DropDownList14324235_TextChanged(object sender, EventArgs e)
   {

       DropDownList t = (DropDownList)sender;
       var sbFilter = new System.Text.StringBuilder();


       if (t.SelectedValue.Length > 0)
       {

           sbFilter.Append("Group_Id ='" + t.SelectedValue + "'");

           ObjectDataSource1.FilterExpression = sbFilter.ToString();
       }
       else
       {
           ObjectDataSource1.FilterExpression = string.Empty;
           ObjectDataSource1.FilterParameters.Clear();

       }
   }

i want to Fitler 1 row With Drop down list i tried this code but not working can anyone help mee?
Posted

1 solution

Try this code

set DropDownlist enable AutoPostBack
 
Share this answer
 
Comments
GTR0123 30-Dec-15 4:56am    
Ty it is working

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