This is a migrated thread and some comments may be shown as answers.

Filtering in Rad Grid using ASP Dropdown

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vikram Vyas
Top achievements
Rank 1
Vikram Vyas asked on 06 Oct 2008, 12:43 PM
Hello ,

I am trying to achive filter feature using asp.net dropdown, following code works fine with filter

====================================

 

SPSite oSPSite = new SPSite(strSiteUrl);

 

 

SPWeb oSPWeb = oSPSite.OpenWeb();

 

 

SPList oSPList = oSPWeb.Lists[strPERListName];

 

 

SPView oSPView = oSPList.Views["All Issues"];

 

 

SPListItemCollection oSPListItemCollection = oSPList.GetItems(oSPView);

 

RadGrid1.DataSource = oSPListItemCollection.GetDataTable();

RadGrid1.DataBind();

==================================================
Now i have a dependent dropdown where i.e User
Selects = Country
and it shows States in another dropwdown. So when use chages the value in Contry dropdown it revert back to original values, becuase the above code is in page load.
i also tried using NeerDataSource evene to get this achived but no success.
===============================================

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 09 Oct 2008, 06:17 AM
Hello Vikram,

Setting the filter like this will not work in all cases. One possible approach in this case would be to use standard AdvancedDataBinding(or a datasource control), and then manually set the filter expression for the control. I hope this suggestion helps.

Sincerely yours,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Vikram Vyas
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or