Author Topic: Does the picklist on toolbar can support muitl-select  (Read 3416 times)

noctrona

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
Does the picklist on toolbar can support muitl-select
« on: August 06, 2014, 02:52:37 pm »
Hi team,

I have a toolbar on my pggrid, and on this toolbar I add a picklist. Now I have a demand, I hope I can select muitl records in this picklist. So I want to know whether we can support this function? Or we can set a mutil-picklist.

The following is my code:
Code: [Select]
toolbar: {
                    items: [
                        { type: '<span>Please choose which column you want to hide: </span>' },
                        { type: 'select', cls: 'sl_dataIndx',
                          options: function (ui) {
                              var CM = ui.colModel,
                                  options = [''];
                              for (var i = 0; i < CM.length; i++) {
                                  options.push(CM[i].title);
                              }
                              return options;
                          },
                          listeners: [
                          {
                              change: function (evt) {
                                  //alert($(this).val());
                              }
                          }
                          ]
                        },
                    ]
                }


Thank you!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Does the picklist on toolbar can support muitl-select
« Reply #1 on: August 06, 2014, 03:06:20 pm »
It can be simply done by adding properties

Code: [Select]
attr: "multiple", style: "height:100px;"

in the select item object.
« Last Edit: August 06, 2014, 03:11:19 pm by paramquery »

noctrona

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
Re: Does the picklist on toolbar can support muitl-select
« Reply #2 on: August 06, 2014, 03:11:58 pm »
It can be simply done by adding property

Code: [Select]
attr: "multiple"

in the select item object.

Hi,

Thanks for your replay!
I add this attribution on my code, and the picklist changed, but is that possible to change the picklist height? When I add this attribution the picklist change to as a area but still very narrow.


Thank you!

noctrona

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
Re: Does the picklist on toolbar can support muitl-select
« Reply #3 on: August 06, 2014, 03:25:18 pm »
It can be simply done by adding properties

Code: [Select]
attr: "multiple", style: "height:100px;"

in the select item object.

I got it.

Thank you!