Author Topic: what is customData? How is it working?  (Read 2697 times)

methney

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 7
    • View Profile
what is customData? How is it working?
« on: September 15, 2014, 06:15:50 am »
Hi! Paramquery!
Thank you always!

I just followed search example. (http://paramquery.com/demos/search)
Then I found 'customData' option, I couldn't understand how it is working.

When put the data using customData option.. like this..
$grid.pqGrid("option", "customData", { foundRowIndices: this.rowIndices, txt: txt, searchColIndx: colIndx });

But I couldn't see any customData.. in each row.
And I also couldn't find any information in docs..

please let me know...

methney

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: what is customData? How is it working?
« Reply #1 on: September 16, 2014, 08:03:15 am »

I just want to add comment with this...

'customData' in here..
It's not by myself.. you can see that example, this is paramquery's regular demo..
That's why I ask..

please consider this...

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: what is customData? How is it working?
« Reply #2 on: September 16, 2014, 08:59:30 am »
customData purpose is to pass custom data to render function.

http://paramquery.com/api#option-customData

It's not present in Pro version as there are other better means ( already present in jQuery ) to pass custom data to any callback function.

data can be appended to $grid by $grid.data(key, value);

and it can be accessed in any callback by

var value = $grid.data(key);