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
45
Condition when adding/editing row
posted

For the post on the link below, please give a concrete example for my comment at the last.

https://ko.infragistics.com/community/forums/t/106632.aspx

Parents
No Data
Reply
  • 3995
    Offline posted

    Hello,

    How about using the custom validation.

    Define the custom validation into editorOptions and extract the other value with editorForKey method.

    features: [{
     name: 'Updating',
     editMode: 'row',
     columnSettings: [
      {
       columnKey: "UnitsInStock",
       validation: true,
       editorOptions: {
        validatorOptions: {
         custom: {
          method: function(value, fieldOptions){
           var someOtherEditor = $('#table1').igGridUpdating("editorForKey", "UnitPrice");
           var someOtherEditorValue = someOtherEditor.igTextEditor("value");
           if (someOtherEditorValue === "$ 1000") {
            return false;
           } else {
            return true;
           } 
          },
          errorMessage: "Value did not match"
         }
        }
       }
      }
     ]
    ]

Children
No Data