Hi All,
I need to put a fdropdown filter in the radgrid. I tried to follow the radgrid demo. But in my case, i need to bind the filter dropdown only in codebehind.
The grid is bound in the needdatasource with an arraylist.
the aspx code is like below,
Can anybody please help on this an explain me how can i bind the filter dropdown from codebehind?
Thanks in advance
Thanks,
Mahesh O A
I need to put a fdropdown filter in the radgrid. I tried to follow the radgrid demo. But in my case, i need to bind the filter dropdown only in codebehind.
The grid is bound in the needdatasource with an arraylist.
the aspx code is like below,
<telerik:GridTemplateColumn UniqueName="Column1" SortExpression="Column1" HeaderStyle-ForeColor="#245E9E" HeaderText="Column 1" ItemStyle-Wrap="true" Resizable="true" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" DataField="Column1">
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxColumn1" DataTextField="Column1" DataValueField="Column1" Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Column1").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="TitleIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function TitleIndexChanged(sender, args)
{
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("Column1", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
<ItemTemplate>
<asp:Label ID="LblColumn1" Text='<%#Eval("Column1")%>' runat="server">
</asp:Label>
<asp:Label ID="LblDataSourceType" Text='<%#Eval("DataSourceType")%>' runat="server" Visible="false">
</asp:Label>
</ItemTemplate>
<HeaderStyle Width="280px" />
<ItemStyle Font-Names="Arial" Font-Size="11px" Wrap="true" />
</telerik:GridTemplateColumn>Can anybody please help on this an explain me how can i bind the filter dropdown from codebehind?
Thanks in advance
Thanks,
Mahesh O A
