So many nuances still: dates, footers, filtering, sorting - is it me?

10 posts, 0 answers
  1. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 09 Jul 2012 Link to this post

    This has been updated. I am an idiot and bad config was causing two of the four original issues I posted on. So the title also is not completely applicable either as the remaining two issues only have to do with the footer and sorting. I apologize!

    These remaining issues have been experienced for a while now but I did not have time to focus on them. I was recently on 601 and confirmed still present for each and then recently upgraded to 621 (Q2 beta). And all same issues.

    I am hoping Kendo Support could confirm if any of these issues are already known or not or any insights in stuff I can play with to get a different result or test. Also, it would be cool if any users can comment if they too have experienced any of this and any workarounds to try.

    Current list of nuances:
    1. Static footer. I saw someone reported an issue on this on grouped grids and that it was fixed in the beta but not true in this case. Basically as soon as the grid renders, the footer scrolls with the columns, as one scrolls to the right on a grid that has too many cols to display. The problem is as soon as you sneeze (sort, filter, refresh, pop up editor - anything), it reverts to the left and becomes static for the rest of its life - 100% of the time.
    2. In same case as #2, when scrolled to the right, sorting or filtering a column now in view will cause the display to revert back to the left-most column/state. Very jarring and very annoying.
    3. Again, related to above when the columns trigger scrolling, scroll to the right and filter on something that returns no results. Then you are reverted back to the left and no scroll bar! So you cannot scroll over to ever clear the filter. You must refresh.
    Thanks!
    Mike
  2. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 11 Jul 2012 Link to this post

    So I am the only one, huh? And is Kendo looking into any of this and thus is unknown to them?

    Additionally, I am having an issue getting paging to work on the new demo build (defaults uninitialized with NaN displayed and then clicking a paging button even tho only a couple rows, causes the pager to "wake" up but then all rows are gone despite it giving the right count). But there, I have two cases that work as expected and many that don't, despite being identical code (the config is abstracted out all grids execute the same core config). But I will keep digging into why the difference. I would appreciate some response though on any of the three items in the original.

    Thanks!
    Mike

  3. Kendo UI is VS 2017 Ready
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 12 Jul 2012 Link to this post

    Hi Michael,

    I was able to reproduce the footer scrolling issue and can confirm that it is a bug. I will forward the problem to the developers and it will be fixed as soon as possible. Meanwhile you could use the following code as a workaround:
    dataBound: function(e) {
         
        //set the initial scroll
        $("#grid").find(".k-grid-footer-wrap")
            .scrollLeft($("#grid").find(".k-grid-content").scrollLeft());
         
        this.content.bind('scroll', function () {
            $("#grid").find(".k-grid-footer-wrap").scrollLeft(this.scrollLeft);
        });
         
    }

    For convenience I prepared a small example using this approach in action.
    As a small sing of our appreciation for bringing this to our attention I updated your Telerik points.

    Regarding the paging issue, could you please send me a small but runnable example that reproduces the problem? Thus way I would be able to investigate in details what is going wrong and advice you further. Please provide such sample and I will check it right away.

    Regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 12 Jul 2012 Link to this post

    Thank you Alexander!!

    To be clear, the workaround is only addressing issue #1 (which works great BTW), correct? What about #2 and #3? Those two issues have to do with being reverted back to the left-most column when scrolled over (not related to the footer, but scrolling and the display itself) and performing a sort or filter operation. It is easy to repro by creating a grid with columns wider than the grid, then scroll over to the right, and then sort/filter one of the columns now in view and be reverted back to the left-most scroll position. 

    Regarding the paging, I only mentioned it just in case there were some insights, but since it worked in a couple cases, I wanted to analyze that better. Sure enough, that was totally my fault. Love the new paging look! I am all good there. 

    Thanks!
    Mike
  6. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 17 Jul 2012 Link to this post

    Hi Michael,

    Does the issue #2 persists in the example that I provided? I tested with sorting and filtering and on my side the scroll did not revert back to the left-most column/state. 

    Regarding the issue #3, I could suggest the following workaround:
    //on dataBound event
     
    if(this.dataSource.view().length == 0) { //if no rows are displayed
         var colspan = this.content.find("table col").length; //determine the colspan
         this.content.find("table").append("<tr><td colspan=" + colspan + "></td></tr>"); //append empty cell
    }

    For convenience I updated the fiddle: http://jsfiddle.net/valchev/cDN26/57/ 

    In this border case (e.g. no data is returned after filtering) the scroll returns back to its initial (left-most) position. If you want to avoid this, you can store the scroll position in a global variable (this has to be done before the filtering) and use it at the dataBound to scroll back to the old position. I would not recommend this however, as it seems to be unnecessary effort which might cause performance issues.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 17 Jul 2012 Link to this post

    Thanks again Alexander for the workaround! Yes, your snippet works around the issue with #3. So we are good there. #2 is still an issue but not with your example. However, there were a couple more settings now clearly impacting the difference in behavior. Grouping is not in my scenario so I removed it and added a couple more config items (navigatable, multiple sort, row selection, reorderable, resizable).

    I have not played with which one of those added settings leads to the behavior but I have updated the example accordingly so you can see the behavior I refer to and you can take it from there: http://jsfiddle.net/cDN26/58/ 

    Thanks again!
    Mike
  8. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 20 Jul 2012 Link to this post

    Hi Michael,

    Thank you for the updated fiddle example.
    Indeed this is a known behaviour connected with the navigatable functionality of the grid. I am afraid that I cannot suggest a suitable approach to avoid it.

    Regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  9. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 20 Jul 2012 Link to this post

    Alexander, OK very well, that is the least important of the features I added, so for the time being, I will just remove the navigatable setting and be good to go!

    Thanks again!
    Mike
  10. AkAlan
    AkAlan avatar
    121 posts
    Member since:
    Jun 2009

    Posted 20 Jul 2012 Link to this post

    Hi Michael, I was reading the Changelog for the latest non beta release and saw that a footer issue had been resolved. Not totally sure if this is your isse but it sounds like it may be. Here is an excerpt of the changes and fixes for MVC Grid wrappers.

    Grid

    What's new

    • Expose column reorder and resize events
    • Support setting html attributes to command buttons
    • Add configuration option to prevent initial ajax binding
    • Ability to change the filtering messages
    • Ability to change the pager messages
    • Support for setting per column header, footer and cell html attributes

    What's fixed

    • Kendo Grid for MVC's footer does not scroll horizontally with the other data cells
    • Footer attributes are not serialized when client footer template is set
    • Setting initial filter on a date field does not work as expected when populated through Ajax binding
    • Destroy confirmation message is not displayed
    • Configuration for popup editing window not serialized for Ajax binding
  11. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 20 Jul 2012 Link to this post

    No, but thanks. There are only the workarounds above that Alexander has provided. I am all good now, with each of those.

    Mike
Back to Top
Kendo UI is VS 2017 Ready