This question is locked. New answers and comments are not allowed.
Daniel Collier
Top achievements
Rank 1
Daniel Collier
asked on 19 Apr 2010, 10:36 PM
We have a grid setup and for the most part it works great, but we've found a few problem scenarios, where settings are being lost.
Example1:
1. Have 1 or more filters preapplied to the grid
(ie.
.Filterable(filtering => filtering
(ie.
.Filterable(filtering => filtering
.Filters(filters => filters.Add(o => o.Name).IsEqualTo("Active"))
2. remove all filters, then sort on a column.
3. The filters are automatically reapplied. This would not seem to be intended behavior.
3. The filters are automatically reapplied. This would not seem to be intended behavior.
Example 2:
1. For a grid with grouping enabled, apply a filter to any column, then drag any column header to the grouping row at the top.
2. They filter is automatically cleared. This also would not seem to be intended behavior. If I am wrong in that assumption, please let me know.
Thanks,
Dan
5 Answers, 1 is accepted
0
Hello Daniel Collier,
I couldn't reproduce those problems in our online examples. Could you show us the required steps?
Greetings,
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.
I couldn't reproduce those problems in our online examples. Could you show us the required steps?
Greetings,
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
Daniel Collier
Top achievements
Rank 1
answered on 20 Apr 2010, 04:29 PM
My apologies, I forgot to mention that ajax needs to be turned off in order to reproduce. I am attaching a copy of FirstLook.aspx from your sample that you can reproduce these issues by the steps I've previously defined, on the FirstLook Grid.
Also, for example 1, on step 2, you can also reproduce this (see the filters auto-reapplied) by applying a group, then removing the grouping.
| <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<OrderDto>>" %> |
| <asp:content contentplaceholderid="maincontent" runat="server"> |
| <% using (Html.Configurator("The grid should...") |
| .PostTo("FirstLook", "Grid") |
| .Begin()) |
| { %> |
| <ul> |
| <li><%= Html.CheckBox("ajax", false, "make <strong>AJAX</strong> requests")%></li> |
| <li><%= Html.CheckBox("grouping", true, "allow <strong>grouping</strong> of data")%></li> |
| <li><%= Html.CheckBox("filtering", true, "allow <strong>filtering</strong> of data")%></li> |
| <li><%= Html.CheckBox("paging", true, "have <strong>pages</strong> with 10 items")%></li> |
| <li><%= Html.CheckBox("scrolling", true, "show a <strong>scrollbar</strong> when there are many items")%></li> |
| <li><%= Html.CheckBox("sorting", true, "allow <strong>sorting</strong> of data")%></li> |
| <li><%= Html.CheckBox("showFooter", false, "show footer")%></li> |
| </ul> |
| <button class="t-button t-state-default" type="submit">Apply</button> |
| <% } %> |
| <%= Html.Telerik().Grid<OrderDto>(Model) |
| .Name("Grid") |
| .Columns(columns => |
| { |
| columns.Bound(o => o.OrderID).Width(100); |
| columns.Bound(o => o.ContactName).Width(200); |
| columns.Bound(o => o.ShipAddress); |
| columns.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120); |
| }) |
| // .DataBinding(dataBinding => |
| // { |
| // dataBinding.Server().Select("FirstLook", "Grid", new { ajax = ViewData["ajax"] }); |
| // dataBinding.Ajax().Select("_FirstLook", "Grid").Enabled((bool)ViewData["ajax"]); |
| // }) |
| .Scrollable(scrolling => scrolling.Enabled((bool)ViewData["scrolling"])) |
| .Sortable(sorting => sorting.Enabled((bool)ViewData["sorting"])) |
| .Pageable(paging => paging.Enabled((bool)ViewData["paging"])) |
| .Filterable(filtering => filtering |
| .Filters(filters => filters.Add(o => o.OrderDate).IsGreaterThan(DateTime.Parse("7/8/1996"))) |
| .Filters(filters => filters.Add(o => o.OrderID).IsGreaterThan(10251))) |
| .Groupable(grouping => grouping.Enabled((bool)ViewData["grouping"])) |
| .Footer((bool)ViewData["showFooter"]) |
| %> |
| </asp:content> |
0
Hello Daniel Collier,
Thank you for helping me reproduce the problem. Fortunately the fix is trivial:
I have also updated your telerik points as a token of our gratitude for reporting this bug.
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.
Thank you for helping me reproduce the problem. Fortunately the fix is trivial:
- Open telerik.grid.filtering.js provided with the source code
- Locate the following line of code:
this.currentPage, this.orderBy || '~', this.groupBy || '~', escape(this.filterBy) || ''); - Replace it with this:
this.currentPage, this.orderBy || '~', this.groupBy || '~', escape(this.filterBy) || '~');
I have also updated your telerik points as a token of our gratitude for reporting this bug.
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
Daniel Collier
Top achievements
Rank 1
answered on 21 Apr 2010, 05:15 PM
Thank you. This has definitely fixed example1, but example2 still seems to be a problem. Perhaps I should have made these separate incidents.
It seems like the grouping clears the filter. Check out the query strings
Nothing
http://localhost:1161/Subscriber/User.mvc
http://localhost:1161/Subscriber/User.mvc
After Filter
http://localhost:1161/Subscriber/User.mvc?UserGrid-page=1&UserGrid-orderBy=~&UserGrid-groupBy=~&UserGrid-filter=BeginDatetm~gt~datetime'2010-01-01T12-00-00'
After Grouping (filter is gone)
http://localhost:1161/Subscriber/User.mvc?UserGrid-page=1&UserGrid-orderBy=~&UserGrid-groupBy=UserName-asc&UserGrid-filter=
0
Hello Daniel Collier,
I couldn't reproduce this issue in our server binding example. I filtered by Contact Name starts with Paul and then I grouped by Contact Name. Filtering remained applied. Could you give us more details how to reproduce that one?
Another thing which I saw is that the previous fix has to be applied to telerik.grid.grouping.js as well (that line is found two times in the code).
OLD:
this.currentPage, this.orderBy || '~', escape(this.groupBy) || '~', escape(this.filterBy) || '');
NEW:
this.currentPage, this.orderBy || '~', escape(this.groupBy) || '~', escape(this.filterBy) || '~');
This clearly indicates a duplication in our code which I would make sure is eliminated.
I have updated your telerik points.
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.
I couldn't reproduce this issue in our server binding example. I filtered by Contact Name starts with Paul and then I grouped by Contact Name. Filtering remained applied. Could you give us more details how to reproduce that one?
Another thing which I saw is that the previous fix has to be applied to telerik.grid.grouping.js as well (that line is found two times in the code).
OLD:
this.currentPage, this.orderBy || '~', escape(this.groupBy) || '~', escape(this.filterBy) || '');
NEW:
this.currentPage, this.orderBy || '~', escape(this.groupBy) || '~', escape(this.filterBy) || '~');
This clearly indicates a duplication in our code which I would make sure is eliminated.
I have updated your telerik points.
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.