Author Topic: Re: How to set colModel's dataIndx to a nested JSON object?  (Read 2474 times)

cgDevelpper

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: How to set colModel's dataIndx to a nested JSON object?
« on: February 13, 2018, 07:17:59 pm »
Is there any similar method which should be called before edit? Because now editor starting with value [object Object]. I am dealing with similar case, but above that I need to support of batch editation.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: How to set colModel's dataIndx to a nested JSON object?
« Reply #1 on: February 16, 2018, 12:00:32 pm »
Correct value for editor can be extracted from nested JSON data ( available in ui.rowData ) in editor.init callback.

Code: [Select]
type: 'textbox',
init: function( ui ){
  //extract from ui.rowData and assign to ui.$editor
  ui.$editor.val( ui.rowData[][] );
}