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

Filter combo box is not filtering

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kannadasan
Top achievements
Rank 1
Kannadasan asked on 24 Nov 2011, 06:10 AM

I am using rad grid in my application .some of Data I have showed in rad grid .we have used 5 column in rad grid, like Name,  age, address, sex and date of birth .

We have given Search option for Filter column in rad gird. Filter Column are Rad combo box .in Age Filter combo box is not filtering (in rad grid Age Data type is integer)

function AgeIndexChanged(sender, args) {

        var Ageobj = $find("<%=rgResults.ClientID%>").get_masterTableView()

        Ageobj.filter("Age", args.get_item().get_value(), "Contains");

 

 

    }

 

 

Inside the Rad grid Column is like (Rad grid Id is rgResults)

 

 

  <telerik:GridBoundColumn DataField="Age" HeaderText="Age" SortExpression="Age" UniqueName="Age"

                            FilterControlWidth="50px" ItemStyle-Width="50px" AllowFiltering="true">

                            <FilterTemplate>

                                <telerik:RadComboBox ID="RadComboBoxAge" DataSourceID="AgeSqlDataSource" DataTextField="Age"

                                    DataValueField="Age" Width="50px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Age").CurrentFilterValue %>'

                                    Height="200px" AppendDataBoundItems="true" runat="server" OnClientSelectedIndexChanged="AgeIndexChanged">

                                    <Items>

                                        <telerik:RadComboBoxItem Text="All" />

                                    </Items>

                                </telerik:RadComboBox>

                            </FilterTemplate>

                        </telerik:GridBoundColumn>

 

 

Can you please give the Correct Solution?

 

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Nov 2011, 06:13 AM
Hello Kannadasan,

Check the following demo which implements the same.
Grid / Filter Templates

-Shinu.
Tags
Grid
Asked by
Kannadasan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or