Hello,
First, I wish you a happy new year ! :-)
Secondly, I am trying to include in the code of my RadGrid the filter template which is being shown here : http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx
But it seems that to fill the DropDown boxes , you are accessing the database each time by defining
SqlDataSource
objects (for example SqlDataSource1
in the code sample :<asp:SqlDataSource ID=
"SqlDataSource1"
ConnectionString=
"<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName=
"System.Data.SqlClient"
SelectCommand=
"SELECT CustomerID, ContactName, ContactTitle, City, Country, Bool FROM Customers"
runat=
"server"
></asp:SqlDataSource>
What I want is to have in each dropdown box only the values that really appear into the corresponding RadGrid column (data from RadGrid datasource) and not all the available values from the database. For example, if I only have 3 different records in the grid, I just want to have the three corresponding values in my drop down boxes.
So can an you tell me how to define my DataSource for all DropDonwn boxes to achieve that ?I have been looking at ObjectDataSource but it seems that by using SqlDataSource or ObjectDataSource, il will always have to send an SQL request to the database. That's exactly what I want to avoid, as I already used an SQL request to retrieve the data when populating the RadGrid ...
Thank you for your help.