Grid Behaviour while editing and sorting

12 posts, 1 answers
  1. Rolando Rosales
    Rolando Rosales avatar
    3 posts
    Member since:
    Apr 2006

    Posted 11 May 2012 Link to this post

    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

  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 15 May 2012 Link to this post

    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!
  3. Rolando Rosales
    Rolando Rosales avatar
    3 posts
    Member since:
    Apr 2006

    Posted 15 May 2012 Link to this post

    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
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 17 May 2012 Link to this post

    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!
  5. Rolando Rosales
    Rolando Rosales avatar
    3 posts
    Member since:
    Apr 2006

    Posted 18 May 2012 Link to this post

    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

  6. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 23 May 2012 Link to this post

    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!
  7. Rolando Rosales
    Rolando Rosales avatar
    3 posts
    Member since:
    Apr 2006

    Posted 23 May 2012 Link to this post

    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
  8. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 25 May 2012 Link to this post

    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!
  9. Rolando Rosales
    Rolando Rosales avatar
    3 posts
    Member since:
    Apr 2006

    Posted 25 May 2012 Link to this post

    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

  10. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 28 May 2012 Link to this post

    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!
  11. Swati
    Swati avatar
    1 posts
    Member since:
    Jul 2020

    Posted 08 Oct 2020 Link to this post

    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.

  12. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2187 posts

    Posted 13 Oct 2020 Link to this post

    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/.

Back to Top