Using text box to update records in the Kendo Grid - Forum - Mobile - Progress Community

Using text box to update records in the Kendo Grid

 Forum

Using text box to update records in the Kendo Grid

This question has suggested answer(s)

Hi there, 

I am currently battling with an issue regarding the Kendo Grid. 

I have a kendo grid, that consists of a text box on each row to update the quantity of each item.

On enter of the text box, the values need to stored so that I can view them in my shopping cart.

I need to be able to update my dataset that is stored in local storage on value change of the text box. 

The value of the quantity is easy enough to retrieve but the other values, not so much. 

How would I go about retrieving the entire rows values on value change of the text box. 

I was using the normals edit popup/inline editing but that does not meet the requirements. 

Thanks in advance. 

Meyrick

All Replies
  • Hello Meyrick,

    Are you using a custom editor for the column?

    Links:

       docs.telerik.com/.../grid

       docs.telerik.com/.../access-editor-control

    If that is the case, you could use options.model to get the row values, the ID or/all the fields, at the time that the editor is created and store some of this data with the widget so that you could use it on the value change event.

    I hope this helps.

    Edsel

  • Hi Edsel.

    This is exactly what I needed.

    I just would like to know how I would go about storing the fields with the widget?

    Also Is it possible to get the textbox to always be visible, currently the textbox only displays when you click on the row item.

    TIA.

  • Hello Meyrick,

    Great.

    You should be able to use jQuery.data() to store the ID or the values:

       api.jquery.com/.../

    Best regards.

  • Regarding the making the textbox always visible. I think that the behavior that Kendo UI does is to switch between view / edit modes using the template and editor properties respectively and the textbox would go away.

    If you really wanted to keep a textbox in view, you could code the template to re-draw the box but I have not tried.

    However, It would be better to use the default behavior and UI interaction since it results in consistent UI/UX.

    Thanks.