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

Bug in filter demo

1 Answer 3 Views
Grid
This is a migrated thread and some comments may be shown as answers.
miksh
Top achievements
Rank 1
Iron
miksh asked on 05 May 2014, 03:35 PM
Please double check the filter dropdown for Is Promoted filed in http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx
When you select "No" the option "Yes" disappears from the dropdown. Similar for "Yes" - "No" disappears.

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 08 May 2014, 05:40 AM
Hello Michael,

Thank you contacting Telerik Support.

The behavior that you are describing is made that way by design and is due to the RefreshCombos() method in the code-behind, where the SelectCommand for the SqlDataSource controls is changed to return only the currently available items within the grid:
protected void RefreshCombos()
{
    SqlDataSource2.SelectCommand = SqlDataSource2.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression.ToString();
    SqlDataSource3.SelectCommand = SqlDataSource3.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression.ToString();
    SqlDataSource4.SelectCommand = SqlDataSource4.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression.ToString();
    SqlDataSource6.SelectCommand = SqlDataSource6.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression.ToString();
 
    RadGrid1.MasterTableView.Rebind();
}

If you remove the above method you will get the normal behavior, where all items will be available after filtering.

Hope that helps.
 

Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
miksh
Top achievements
Rank 1
Iron
Answers by
Konstantin Dikov
Telerik team
Share this question
or