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

Radgrid filtering with combobox

1 Answer 245 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Kiran asked on 18 May 2010, 06:34 PM
Hi telerik,

I have a simple grid with the filter options, I am trying to apply filter functionality by textbox(working fine) and combobox column, but combobox filter is not working at all, below is my code and please help asap.



telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1"












ClientSettings-Scrolling-AllowScroll="true" OnPreRender="RadGrid1_PreRender"



ClientSettings-Selecting-AllowRowSelect="true" EnableLinqExpressions="true"



AllowSorting="True" runat="server">



<GroupingSettings CaseSensitive="false" />



<MasterTableView >






<telerik:GridBoundColumn HeaderText="Employee Number" DataField="KEYID"



UniqueName="KEYID" SortExpression="KEYID" FilterControlWidth="30px"



Visible="false" ShowFilterIcon="false" />



<telerik:GridBoundColumn HeaderText="Employee Name" DataField="Name" UniqueName="Name"



SortExpression="Name" HeaderStyle-Width="300px" FilterControlWidth="140px"



AutoPostBackOnFilter="true" CurrentFilterFunction="contains" ShowFilterIcon="false" />



<telerik:GridBoundColumn HeaderText="SSN" DataField="EMP_SSN" HeaderStyle-Width="205px"



UniqueName="SSN" SortExpression="EMP_SSN"



FilterControlWidth="90px" AutoPostBackOnFilter="true" CurrentFilterFunction="contains"



ShowFilterIcon="false" />



<telerik:GridBoundColumn HeaderText="Pay Period" DataField="CODE" HeaderStyle-Width="205px"



UniqueName="CODE" >







<telerik:RadComboBox ID="RadComboBoxPP" DataSourceID="SqlDataSource4" DataTextField="Code"



DataValueField="Code" Height="100px" AppendDataBoundItems="true" AutoPostBack="true"



SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Code").CurrentFilterValue %>'



runat="server" OnClientSelectedIndexChanged="PPIndexChanged"  >






<telerik:RadComboBoxItem Text="All" />









<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">



<script type="text/javascript">



function PPIndexChanged(sender,args) {



var tableView=$find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID%>");





























<ClientEvents OnRowSelected="RowSelected" />









<asp:SqlDataSource ID="SqlDataSource4" runat="server"></asp:SqlDataSource>



1 Answer, 1 is accepted

Sort by
Telerik team
answered on 19 May 2010, 11:04 AM
Hi Kiran,

I reviewed the setup, and noticed that you set the AutoPostBack property of the RadComboBox to true. Please try to set it to false and let me know if the problem still persists.

Additionally, I suggest you examine the online resources below, which elaborate on this subject: 

Sincerely yours,
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question