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

Incell editing, updated row goes to bottom of grid

5 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jokull
Top achievements
Rank 1
Jokull asked on 04 Sep 2017, 09:44 PM

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?

5 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 06 Sep 2017, 01:56 PM
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.
0
Jokull
Top achievements
Rank 1
answered on 06 Sep 2017, 09:43 PM

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?

0
Georgi
Telerik team
answered on 08 Sep 2017, 01:26 PM
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.
0
Jokull
Top achievements
Rank 1
answered on 20 Sep 2017, 02:23 PM
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?
0
Accepted
Georgi
Telerik team
answered on 22 Sep 2017, 02:10 PM
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.
Tags
Grid
Asked by
Jokull
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Jokull
Top achievements
Rank 1
Share this question
or