Author Topic: Toolbar listener anonymous function - getting an ID from the 'this' object  (Read 2120 times)

MEngelbyPQ

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
I've got 3 different pq_grids, one on each jquery tab.  I've differentiated each grid and id attributes on the controls within the toolbar.  The part where I am having difficulty is identifying which export_control from which pq_grid is being executed in the anonymous function within the pq_grid toolbar.  I want to get the id of the event target.

I've tried many many things, the latest being this.pqGrid but pqGrid isn't a method of the object.  I'm using version 3.3.4.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Toolbar listener anonymous function - getting an ID from the 'this' object
« Reply #1 on: December 21, 2016, 09:04:13 pm »
id of the grid can be obtained within the listener function as

Code: [Select]
  this.widget().attr("id")

MEngelbyPQ

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Toolbar listener anonymous function - getting an ID from the 'this' object
« Reply #2 on: December 21, 2016, 09:41:02 pm »
That did it.  It's pretty obvious that I need to read all the documentation.  Not just the parts that seem to relate to what I am working on.  Thanks for answering something that should of been RTFM.

From Minnesota America - Happy Holidays!