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

Bug: Initial filter with ajax binding

13 Answers 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dan Søndergaard
Top achievements
Rank 1
Dan Søndergaard asked on 20 Apr 2010, 09:12 AM
I'm trying to set an initial filter on my grid using Ajax binding:

.Filterable(filtering => filtering.Filters(f => f.Add(o => o.LotId).IsEqualTo(Model.LotId)))

However when the grid is loaded, the filter is not included in the GridCommand, i.e.: gridCommand.FilterDescriptors is empty.

If I modify the filter after initial load, the filter descriptors are send to my ajax method without problems, so it seems as if the initial configuration is not carried to the service.

Any idea when this problem will be fixed?

Your help is much appreciated!

/Dan

13 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 20 Apr 2010, 09:39 AM
Hi Dan Søndergaard,

This sounds like a problem which we have already fixed in the current official release Q1 2010 SP1. However since service packs are only available for licensed users you can try the build attached in this forum thread.

Regards,
Atanas Korchev
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.
0
Dan Søndergaard
Top achievements
Rank 1
answered on 20 Apr 2010, 09:51 AM
Hi Atanas,

Thank you for the answer. However, it didn't solve my problem. After using the new DLL and scripts, I still get the same error.

/Dan
0
Atanas Korchev
Telerik team
answered on 20 Apr 2010, 09:53 AM
Hi Dan Søndergaard,

How can I reproduce the problem? Would appreciate the required steps.

Regards,
Atanas Korchev
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.
0
Dan Søndergaard
Top achievements
Rank 1
answered on 20 Apr 2010, 10:54 AM
Try and open up your Example solution.

Replace content of AjaxBinding.aspx with:

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content contentPlaceHolderID="MainContent" runat="server">
<%= Html.Telerik().Grid<Order>()
        .Name("Grid")
        .Columns(columns =>
{
            columns.Bound(o => o.OrderID).Width(100);
            columns.Bound(o => o.Customer.ContactName).Width(200);
            columns.Bound(o => o.ShipAddress);
            columns.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120);
        })
        .DataBinding(dataBinding => dataBinding.Ajax().Select("_AjaxBinding", "Grid"))
        .Pageable()
        .Sortable()
        .Scrollable()
        .Groupable()
        .Filterable(filtering => filtering.Filters(f => f.Add(o => o.OrderID).IsEqualTo(10248)))
%>
</asp:Content>

 Run the solution, and you will see that the filter is not applied to the grid.

/Dan
0
Atanas Korchev
Telerik team
answered on 20 Apr 2010, 11:49 AM
Hi Dan Søndergaard,

I just tested with the 2010.1.415 build and this works as expected. Please make sure you have performed the upgrade correctly. Check the assembly version in the References node.

Regards,
Atanas Korchev
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.
0
Dan Søndergaard
Top achievements
Rank 1
answered on 20 Apr 2010, 02:41 PM
Hi Atanas,

I'm using the MVC 2 DLL in version 2010.1.416.235. And that's the version that's in the link you send me, and I still cannot get it to work.

/Dan
0
Accepted
Atanas Korchev
Telerik team
answered on 20 Apr 2010, 03:58 PM
Hi Dan Søndergaard,

I am sending you a modified version of our examples including the change you described in your post. I am also sending a screenshot showing how it looks at my side. Let me know if I am missing something.

Regards,
Atanas Korchev
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.
0
Dan Søndergaard
Top achievements
Rank 1
answered on 20 Apr 2010, 05:10 PM
Hi Atanas,

It worked! I replaced the DLL and JavaScript files, and it now works.

Thank you very much for all your help. Excellent customer service and quick response time :)

/Dan
0
James Killick
Top achievements
Rank 1
answered on 14 May 2010, 01:12 PM
Hi Atanas,

Could you tell me when this fix will be publicly available with MVC 1 compatibility?

Thanks,
James
0
Atanas Korchev
Telerik team
answered on 14 May 2010, 01:43 PM
Hello James Killick,

The build is attached here.

Regards,
Atanas Korchev
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.
0
James Killick
Top achievements
Rank 1
answered on 14 May 2010, 03:04 PM
Thanks Atanas, that solved the issue for me.

James
0
Neil Sareen
Top achievements
Rank 1
answered on 11 Jun 2010, 05:16 AM
After downloading this build, I am still having a similar problem.  When I use an initial filter, the filter is executed properly when there are records returned with the filter, but if no records match, the grid will be empty for a second or so, then all the data will show up, and the grid columns are all smashed (not aligned to the header)  Have you ever seen this behavior, and is there a known fix?

Thanks,
Neil
0
xu
Top achievements
Rank 1
answered on 13 Dec 2011, 12:36 PM
I have the same problem.
the filter is not included in the GridCommand, so all the records is show in grid if there is no match in filters
Tags
Grid
Asked by
Dan Søndergaard
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Dan Søndergaard
Top achievements
Rank 1
James Killick
Top achievements
Rank 1
Neil Sareen
Top achievements
Rank 1
xu
Top achievements
Rank 1
Share this question
or