Author Topic: jQuery selector to grid enclosing div  (Read 4557 times)

RedBully

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
jQuery selector to grid enclosing div
« on: April 07, 2014, 03:09:23 pm »
I have a grid object defined in a .js:

oa.pqGridDefaultObject =
    {
        flexWidth: true,
        flexHeight: true,       
        //numberCell: { resizable: true, title: "#", width: 30, minWidth: 30 },
        collapsible: false,
        scrollModel: { horizontal: false },
        showHeader: true,
        showTitle: false,
        //topVisible: false,
        //bottomVisible: false,
        showBottom: false,
        selectionModel: { type: 'none', subtype: 'incr', cbHeader: true, cbAll: false },
        //numberCell: true,
        editable: true,
        //editor: { type: 'textbox' },
        rowDblClick: executeParamGridCommandSet,
        cellSave: executeParaGridSaveCommandSet,       

etc.

This is attached to a div as follows:

var VRfGPf_Pageobj = oa.pqGridDefaultObject;


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6113
    • View Profile
Re: jQuery selector to grid enclosing div
« Reply #1 on: April 07, 2014, 09:00:28 pm »
could you please mention your question.

RedBully

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: jQuery selector to grid enclosing div
« Reply #2 on: April 07, 2014, 10:40:00 pm »
Not sure where that went. The rest:

This is attached to a div as follows:

var VRfGPf_Pageobj = oa.pqGridDefaultObject;


RedBully

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: jQuery selector to grid enclosing div
« Reply #3 on: April 08, 2014, 03:17:12 pm »
Failed again to upload/ render for some reason. I'll attach this time. Thanks for your attention.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6113
    • View Profile
Re: jQuery selector to grid enclosing div
« Reply #4 on: April 08, 2014, 03:33:44 pm »
In column.editable callback function 'this' points to grid

Code: [Select]
  var gridId = $(this).attr('id');

you need to pass 'this' to oa.IsCellEditable as oa.IsCellEditable.call(this, ui);


RedBully

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: jQuery selector to grid enclosing div
« Reply #5 on: April 08, 2014, 05:57:33 pm »
Excellent. Thanks.