Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
360
Update row with additional value
posted

Hello,

We need to update a row and send an additional value with it, which is not a column. We're using the method igGrid.saveChanges.

The only way to do this we found so far is to add a hidden column, and set the additional value in it but we don't really like this solution, is there another way of doing it ?

Thanks

Parents
No Data
Reply
  • 740
    Verified Answer
    Offline posted

    Hello Vincent,

    Thank you for posting into our community!

    I have been looking into your question and an approach I could suggest is using igGridUpdating’s editRowEnding event and declaring a temporary variable where the updated values are assigned to it as well as the additional value. This could look similar to the following:

    editRowEnding: function (evt, ui) {
        var temp = ui.values;
        temp.Additional = "Add Value";
        ui.values = temp;
    },

    Furthermore, you have mentioned that you are using the igGrid’s saveChanges method and this approach is applicable for this case as well since the modified changes performed in the editRowEnding event, i.e., adding the additional value, are sent to the ig_transactions field. This could be observed in the below attachment:

    Additionally, I have prepared a small sample demonstrating my suggestion and it could be found here. Please test it on your side and let me know if you need any further assistance regarding this matter.

    In case this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back a long with steps to reproduce.

    Looking forward to your reply.

    Sincerely,
    Riva Ivanova
    Entry Level Software Developer

Children