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
2515
How to override value in editcellending
posted

I have an iggrid cell with an Update editorType = 'combo'. I have a certain value (-1) in the dropdown which, when selected, causes the cell value to be set to a default value. Based upon the documentation it would appear that if ui.value is set to a different value, then this will be update in the data grid. However, this does not appear to be happening. At least, it does not appear that the visible value in the grid is being set to the specified value. Is there a way to override a value entered into the grid?

    $("#gridProperties").on("iggridupdatingeditcellending", function (evt, ui) {
     // We will only modify the ValueId column
     if (ui.columnKey == "ValueId") {
        if ( ui.value == -1 )
        {
         ui.value = some default value;
        };
      
     };

    });

Parents
  • 23953
    Verified Answer
    Offline posted

    Hello Ray,

    The code you're using is correct, but unfortunately this functionality is not working in 15.2. I logged an internal issue with Development ID 212193 so that we can fix it in our codebase.

    I also created a case on your behalf with number CAS-168586-D8T6V2 , so that you can be notified when there is a resolution for the issue.

    You can find your active cases under Account - Support Activity in our website. Select your ticket and go to Development Issues tab to view the status of related development issues.

    As a temporary workaround I can suggest that you handle the editCellEnded event and set the default value there like this:

    editCellEnded: function (evt, ui) {

    if (ui.value === -1) {

    ui.owner.setCellValue(ui.rowID, ui.columnKey, "Some Default Value");

    }

    }

    Note that this approach will generate 2 transactions. One with value "-1" and the other with value "Some Default Value". Switching aggregateTransactions to true and autoCommit to false will accumulate the 2 transactions in 1.

    Best regards,
    Martin Pavlov
    Infragistics, Inc.

Reply Children
No Data