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
505
Setting Value of igGrid cell with valueKey from combo cell
posted

Hello, 

I'm currently working with igGrid and having difficult figuring out how to do something.

I have  a cell in my grid setup as a comboBox called "JobID". I also have another column in my grid called "JobKey".

The valueKey of the JobID combo is JobKey. If the user is entering a new row of editing a row, I want the JobKey column to update to display the correct one.

So how do I set the JobKey cell in this row the same as the valueKey of my in-Grid combo's valueKey?

This i've been tinkering around with selectionChange, but never got it working. This was my closest attempt.

{

columnKey: 'JobID',
editorType: 'combo',
editorOptions:

{
   loadOnDemandSettings: {
             enabled: true,
              pageSize: 25
   },
   responseDataKey: "value",
   dataSource: jobDS,
   filteringType: "remote",
   textKey: "JobID",
   valueKey: "JobKey",
   virtualization: true,
   autoComplete: true,
   itemTemplate: "<div>${JobID} - ${JobName}</div>",
   nullText: "",
   headerTemplate: "<div class='dropDownHeaderFooter'>Select a Job</div>",
   footerTemplate: "<div class='dropDownHeaderFooter'></div>",
   filterExprUrlKey: 'startsWith',
   mode: 'editable',
   selectionChanged: function (evt, ui) {
        $("#gridReservations").igGridUpdating("setCellValue", //getrowID?, 'JobKey', //valueKey??);
   }

}

};

(sorry for poor indentation)

Thanks,

Julie