6 Answers, 1 is accepted
You can use FilterTemplates to achieve this requirement. Place the combos within the template and implement your custom cascading logic:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx
You can also check the first web site from this post:
http://www.telerik.com/forums/how-to-persist-dropdownlist-selected-index-and-value-on-postback-from-radgrid-filtertemplate#GW3MyQLmVEmy8XzsmrHzeQ
Regards,
Eyup
Telerik
Thank you Eyup. Figured it out!
I even managed to place the outside the grid.
Here's what it looked like
<
table
id
=
"filter"
>
<
tr
>
<
th
colspan
=
"2"
>Filter Data</
th
>
</
tr
>
<
tr
>
<
td
>by Group Company</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
EmptyMessage
=
"Select"
AutoPostBack
=
"true"
DataSourceID
=
"ddlGroupCompany"
DataTextField
=
"GroupCompany"
DataValueField
=
"GroupCompany"
Width
=
"186px"
AppendDataBoundItems
=
"true"
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"All"
Value
=
"0"
Selected
=
"true"
></
telerik:RadComboBoxItem
>
</
Items
>
</
telerik:RadComboBox
>
</
td
>
</
tr
>
<
tr
>
<
td
>by Company</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"RadComboBox2"
runat
=
"server"
EmptyMessage
=
"Select"
DataSourceID
=
"ddlCompany"
DataTextField
=
"CompanyUserName"
DataValueField
=
"CompanyUserName"
Width
=
"186px"
>
</
telerik:RadComboBox
>
</
td
>
</
tr
>
<
tr
>
<
td
>by Customer</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"RadComboBox3"
runat
=
"server"
EmptyMessage
=
"Select"
DataSourceID
=
"ddlCustomer"
DataTextField
=
"UserName"
DataValueField
=
"UserName"
Width
=
"186px"
>
</
telerik:RadComboBox
>
</
td
>
</
tr
>
</
table
>
For the SQL tables, indicated a control, it looked like this
*SQL for the 3rd (RadComboBox3 in this example)
<
asp:SqlDataSource
ID
=
"ddlCustomer"
runat
=
"server"
ConnectionString='<%$ ConnectionStrings:SiteSqlServer %>' SelectCommand="SELECT * FROM [Customer] WHERE ([GroupCompany] = @GroupCompany)">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"RadComboBox1"
PropertyName
=
"SelectedValue"
Name
=
"GroupCompany"
Type
=
"String"
></
asp:ControlParameter
>
</
SelectParameters
>
</
asp:SqlDataSource
>
And here's what it looks like inside the AjaxManager
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadComboBox1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadComboBox2"
UpdatePanelCssClass
=
""
></
telerik:AjaxUpdatedControl
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadComboBox3"
UpdatePanelCssClass
=
""
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadComboBox1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadComboBox3"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Default"
></
telerik:RadAjaxLoadingPanel
>
I may have some redundancies here. Let me know if there's anything i can improve on or i missed out on anything.
Thanks
UPDATE: may have figured out how to make the cascade itself but still having difficulties using the 2nd control the nested grid.
Also, due to changes that to be made, had to join 2 SQL tables for the nested grid (details table). Is it possible with to create a filter for that kind of grid?
I'm afraid it is difficult to figure out your exact requirement. Could you elaborate on your scenario and send us screenshots or video demonstrating the desired behavior?
Regards,
Eyup
Telerik
Hi Eyup,
Here's what's currently working:
This shows how the work for this module (thanks to your tip)
http://imgur.com/JKuekY0
What need is to have the 2nd 'Company' control the content of the nested table
http://imgur.com/1UWceoy
In addition, the nested table doesn't have the column 'Company' and had to join it with another table (ProductCodes). Here's what the table relationship looks like:
http://imgur.com/CWSDUHG
is this possible?
Let me know if you need me to further elaborate on what i need. Thank you for the help.
For further instructions, please open a formal support ticket and send us a very basic runnable prototype of your application so we can further investigate it.
Regards,
Eyup
Telerik