Author Topic: cell editor broke when upgraded to PRO version  (Read 4644 times)

jpantona

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 11
    • View Profile
cell editor broke when upgraded to PRO version
« on: October 18, 2013, 05:52:40 am »
I had the datePicker editor and the dropDownList editor working as shown in the above example. Then I upgraded to the pqgrid PRO and it stopped working... any ideas?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6296
    • View Profile
Re: cell editor broke when upgraded to PRO version
« Reply #1 on: October 18, 2013, 08:07:10 am »
The editor API is bit changed in Pro.

Instead of

editor: function(ui){ }
&
getEditCellData: function(ui){ }

you have to use

editor: { type: function(ui){ }, getData :function(ui){ } )


http://paramquery.com/pro/api#option-column-editor

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6296
    • View Profile
Re: cell editor broke when upgraded to PRO version
« Reply #2 on: October 23, 2013, 01:37:08 am »
This is an example for custom editors (jQueryui autocomplete, datepicker and select lists)

http://paramquery.com/pro/demos/editing_custom

jpantona

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: cell editor broke when upgraded to PRO version
« Reply #3 on: November 06, 2013, 11:48:07 pm »
Ok. That helped. Thank you. However, it took awhile to get that to work because, depending on the verion of jQuery, this portion of the sample:
Code: [Select]
$inp.autocomplete({
            source: (dataIndx == "books" ? books : countries),
            minLength: 0
        }).focus(function () {
            //open the autocomplete upon focus
            $(this).data("autocomplete").search($(this).val());
        });

Needs to change to:
Code: [Select]
$inp.autocomplete({
            source: arr,
            minLength: 0
        }).focus(function () {
            //open the autocomplete upon focus
            $(this).data("uiAutocomplete").search($(this).val());
        });
In summary, 'autocomplete' needed to change to uiAutocomplete.