Author Topic: getData from custom editor  (Read 2805 times)

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
getData from custom editor
« on: June 03, 2014, 08:34:42 pm »
I have a custom dropdown editor where I populate the combo box with value and description successfully.
Now I want to return just a value of this combo selected item in the column custom editor getData as per you earlier suggestion.
I added getData method within the editor and now I can see the combo box html value/label pairs in ui.$cell.
The ('.comboSelector:selected).val() is undefined even though in the cell html I do see it.

How do I extract this value in most efficient way?

Many thanks for your support.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6296
    • View Profile
Re: getData from custom editor
« Reply #1 on: June 03, 2014, 08:43:50 pm »
I assume comboSelector is the class of your select list.

value = $( ".comboSelector" ).val()

text or label  = $( ".comboSelector option:selected" ).text()

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: getData from custom editor
« Reply #2 on: June 03, 2014, 08:51:47 pm »
Oh man, you are so good!!!
Thanks a lot.