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

Grid Behaviour while editing and sorting

11 Answers 330 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rolando Rosales
Top achievements
Rank 1
Rolando Rosales asked on 11 May 2012, 07:27 PM
Hi,
I have a few issues right now which i cant seem to address. if anyone has any info or suggestions would be appreciated, thanks,

i am using batch editing, and so,...

1.) Is there a way to disable sorting while editing?

and

2.) Is there a way to load the grid in edit mode? users are having a tough time figuring out which columns are editable at first. i would like to have the behavior of when you click on an editable cell it renders differently... can i have that for all columns at once?

Thanks,

Rolando

11 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 15 May 2012, 01:18 PM
Hi Rolando,

Straight to your questions:

  1. I am afraid that this functionality is not supported at present. Sorting cannot be disabled after grid's initialization.
  2. The grid has editCell and editRow methods which puts the specified table element into edit mode. You could use them to put the grid into editing mode after the grid is loaded.
  3. I cannot fully understand what you mean by "I would like to have the behavior of when you click on an editable cell it renders differently".

    It is possible to define custom editors or to use one of the other build-in editing modes - inline or popup, if you think that they will deliver better user experience.

I hope this helps.

Greetings,
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!
0
Rolando Rosales
Top achievements
Rank 1
answered on 15 May 2012, 02:27 PM
Hi Alexander,
Thanks for the suggestions, here are my remarks:

1.) if this is not supported then this could be a defect with the grid, for instance, if I edit various rows, then sort, how will the user Visually know which rows were modified? this can lead to confusion as these values were never persisted...

2.) Do you have a good example for this? Right now I am using similar code to do so and it's not converting the rows:
grid.editRow(grid.tbody.find(">tr")); // get all rows, but nothing happens

3.) please disregard this lol, sorry, bad choice of words, all I meant to say was, after initial load, how can I render the cells that are editable differently so that users know which cells are editable. Similar to what i need in #2

Thanks,
Rolando

Ps. I have looked and searched this site for different and more in depth examples and I seem to be finding the same basic examples. Please let me know what other resources are available to get good examples for kendo framework, thanks
0
Alexander Valchev
Telerik team
answered on 17 May 2012, 04:15 PM
Hello Rolando,

Thank you for the feedback. We are aware of the behaviour described in the first point, but I will forward your thoughts to the team for further consideration.

The editRow methods accepts a row (<tr> element) to be edited, while you are trying to pass all grid rows to it. Could you please try to select only the first element: grid.editRow(grid.tbody.find(">tr").eq(0)) 

As for the examples, you may check our github page as well as the blog posts - there you will find sample projects, tutorials and tips.

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!
0
Rolando Rosales
Top achievements
Rank 1
answered on 18 May 2012, 09:25 PM
Hi Alexander,
I applied the following code and it has no effect to the grid:

var grid = $('#' + gridId).data('kendoGrid');

  if (grid != undefined) {
   var $rows = grid.tbody.find("> tr");

   for (var counter = 0; counter < $rows.length; counter++) {
    grid.editRow($rows.find(">tr:eq(" + counter + ")"));
   }
  }

i have verified that the number of rows to the grid are > 0.

Thanks,

Rolando

0
Alexander Valchev
Telerik team
answered on 23 May 2012, 03:57 PM
Hi Rolando,

It is possible to have only one edited item (cell for batch mode or row for inline/popup) at a time. In other words you cannot put all rows in edit mode, but only one of them - that is why the editRow/editCell methods accepts a single element. For convenience please check the following example:

editable: "inline",
dataBound: function(e) {
    this.editRow(this.tbody.find("tr").eq(0));
}


Greetings,
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!
0
Rolando Rosales
Top achievements
Rank 1
answered on 23 May 2012, 06:12 PM
Hi Alexander,
I have a requirement to visually show the users which columns/rows are editable (all at once at initial load time), as well as to visually show which columns/rows were modified (if any), based on your last reply i guess these are not possible?

Thanks,

Rolando
0
Accepted
Atanas Korchev
Telerik team
answered on 25 May 2012, 10:00 AM
Hi Rolando,

 Yes, those requirements are not currently supported by the Kendo grid.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Rolando Rosales
Top achievements
Rank 1
answered on 25 May 2012, 05:28 PM
Thanks guys for your help, will these ever be supported? how can customers request for these features?

Especially since these features make most sense to users especially when doing bacth editing:


1.) visually show the user which columns/rows are editable (all at once at initial load time),
2.) visually show which columns/rows were modified (if any)
    - especially when batch editing, when saving the collection (non-transactional), if some were rows were saved and some were not, the saved items should reload with new values and cleared of being dirty while the un-saved rows should be left as is

Thanks for your help.

Rolando

0
Alexander Valchev
Telerik team
answered on 28 May 2012, 04:53 PM
Hello Rolando,

Thank you for the feedback.
I am afraid that the implementation of those requirements is not currently planned. We will appreciate if you post your ideas at our user voice forum - that is the place where users can give suggestions, request new features and evaluate the already submitted proposals. If your suggestion turns out to be popular we will consider it for releases.

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!
0
Swati
Top achievements
Rank 1
answered on 08 Oct 2020, 07:37 PM

How can I keep  kendo cell data non editable while sorting ? 

When I am clicking on asc/desc icon the cell dara is getting editable. So please suggest how can I keep column data non editable while sorting.

0
Ivan Danchev
Telerik team
answered on 13 Oct 2020, 11:48 AM

Hello Swati,

Here's a dojo example with sorting enabled in the Grid: https://dojo.telerik.com/iWeJenur

The cells don't enter in edit mode on sorting a column.

Could you demonstrate the issue in the linked example?

Regards,
Ivan Danchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Rolando Rosales
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Rolando Rosales
Top achievements
Rank 1
Atanas Korchev
Telerik team
Swati
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or