Incell editing, updated row goes to bottom of grid

6 posts, 1 answers
  1. Jokull
    Jokull avatar
    15 posts
    Member since:
    Oct 2016

    Posted 04 Sep 2017 Link to this post

    I have a grid with incell editing. Everything works fine, the incell editing has a dropdown list. 

    My problem is that once the row (cell) has been updated, it goes to the bottom of the grid. Any idea what might be causing that?

  2. Georgi
    Admin
    Georgi avatar
    650 posts

    Posted 06 Sep 2017 Link to this post

    Hi Jokull,

    Based on the provided information I assume that there is some sorting applied to the grid and the updated row is sorted to the bottom. Please make sure that there is no sort applied and try to update a row. If the issue still occurs please send me small runnable sample where the problem replicates, so I can investigate it locally and help you more efficiently.


    Regards,
    Georgi
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Jokull
    Jokull avatar
    15 posts
    Member since:
    Oct 2016

    Posted 06 Sep 2017 in reply to Georgi Link to this post

    Thanks Georgi, for you response.

    As you suspected, there was a sorting on the grid. The sorting was on a datetime field. When removing the sorting, the problem previously described disappeared but the root of the problem still exists. So after I update the cell, the datetime field changes. I figured out why that is.

    On my datetime filed I have .Format("{0:dd.MM.yyyy}") and when the model gets posted, the dd and MM have switched places and when it is returned to the view it is no longer "03.09.2017", it is "09.03.2017". What I can do is adding a string property to my viewModel returning the formatted date value. That doesn't sound like a proper solution though. Is there a better way to solve this?

  4. Georgi
    Admin
    Georgi avatar
    650 posts

    Posted 08 Sep 2017 Link to this post

    Hi Jokull,

    This issue occurs because the client-side and server-side cultures are not the same. Once they are set to be equal parsing dates will behave as expected.

    The following article demonstrates how to match both cultures step by step:



    Regards,
    Georgi
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Jokull
    Jokull avatar
    15 posts
    Member since:
    Oct 2016

    Posted 20 Sep 2017 in reply to Georgi Link to this post

    Thanks for that. I understand that but.. in my application the user can change the culture. How would I change the culture dynamically? I would have to change it UI and server side right?
  6. Answer
    Georgi
    Admin
    Georgi avatar
    650 posts

    Posted 22 Sep 2017 Link to this post

    Hello Jokull,

    That is correct, it is necessary to change both cultures dynamically, based on the user preferences. Possible solution is to get to  the server the culture either using query string or Request.UserLanguages. Then set the same culture to Kendo as illustrated in the following article:


    The following demo illustrates how to change the culture based on user choice and match both server-side and client-side cultures:



    Regards,
    Georgi
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top