3 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 14 Aug 2013, 07:56 AM
Hi Mahesh,
Please try the below code snippet to bind a RadComboBox in filter template.
ASPX:
C#:
Thanks,
Princy
Please try the below code snippet to bind a RadComboBox in filter template.
ASPX:
<
telerik:GridBoundColumn
UniqueName
=
"ContactTitle"
DataField
=
"ContactTitle"
HeaderText
=
"Contact title"
HeaderStyle-Width
=
"200px"
>
<
FilterTemplate
>
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
></
telerik:RadComboBox
>
</
FilterTemplate
>
</
telerik:GridBoundColumn
>
C#:
protected
void
RadGrid1_ItemDataBound(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridFilteringItem)
{
GridFilteringItem item = (GridFilteringItem)e.Item;
RadComboBox combo = (RadComboBox)item.FindControl(
"RadCombobox1"
);
combo.DataSourceID =
"SqlDataSource2"
;
combo.DataTextField=
"ContactTitle"
;
combo.DataValueField =
"ContactTitle"
;
}
}
Thanks,
Princy
0
sukhwinder
Top achievements
Rank 1
answered on 22 Mar 2017, 06:38 PM
Hi,
how do i filter data based on selected values in the above RadComboBox
Thanks
0
Hello Sukhwinder,
Generally, you can check the implementation provided in the following live sample:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx
You can also find some nice runnable examples here:
http://www.telerik.com/forums/how-to-persist-dropdownlist-selected-index-and-value-on-postback-from-radgrid-filtertemplate#GW3MyQLmVEmy8XzsmrHzeQ
I hope this will prove helpful.
Regards,
Eyup
Telerik by Progress
Generally, you can check the implementation provided in the following live sample:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx
You can also find some nice runnable examples here:
http://www.telerik.com/forums/how-to-persist-dropdownlist-selected-index-and-value-on-postback-from-radgrid-filtertemplate#GW3MyQLmVEmy8XzsmrHzeQ
I hope this will prove helpful.
Regards,
Eyup
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.