Author Topic: Multiple selection dropdown control in one column  (Read 3439 times)

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Multiple selection dropdown control in one column
« on: April 04, 2014, 12:46:52 am »
Hi guys,
I am using a pro version (still evaluating)
I am trying to use a multiple selection dropdown control in one column but can't really make it work.
I need to select multiple values from the drop down that is within the grid.
Currently I am using jquery-gentleSelect control but open for any suggestion.

I define one column as:
            {title: "Select", dataIndx:"slct", resizable: false, sortable:false,
                  editor: {
                        type: "<select id='slctApplyTo' multiple='multiple'><option value='1'>FName1 LName1</option><option value='2'>FName2 LName2</option><option value='3'>FName3 LName3</option><option value='4'>FName4 LName4</option><option value='5'>FName5 LName5</option></select>"
                   }
            }


and have a code to make gentleSelect work:
    $("#slctApplyTo").gentleSelect(
        {
            columns: 1,
            itemWidth: 100,
            maxDisplay: 3
         }
    );

Any help would be appreciated.
Thanks a lot,

   

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Multiple selection dropdown control in one column
« Reply #1 on: April 04, 2014, 06:52:05 pm »
your editor.type should be a callback in which

1) you have to construct and return markup of the select

2) initialize the select plugin.


Correction:
=========================
no need to return anything in the callback. just append markup to ui.$cell 
« Last Edit: April 04, 2014, 10:50:01 pm by paramquery »

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: Multiple selection dropdown control in one column
« Reply #2 on: April 04, 2014, 11:41:46 pm »
Great,
Thanks a lot.