0

I had a look at this Is there anyway to include a MultiSelect Combobox in a jqGrid?

I am using grouping in my grid. I need to display different multi-select dropdownlist for each group. In the example above, we set the values initially before building the grid. In this case, how can I do this based on each group?

Considering this country, state example

Jqgrid - grouping row level data

How will the design be if I have a multi select drop down for cities in each row. Dropdown for Cities for Texas should have only the cities in Texas. And cities in California will be in drop down for California. So there are 2 different drop down lists based on the state.

Update:

I have tried these 2 things a) Eric Hyndes dropdown multiselect plugin -- the problem with the plugin is when I use this for each row, all the checkboxes are appended to document.body. Instead they should appear for each dropdown

b) Bootstrap multiselect -- the problem here is, I have the jqGrid row as 35 px. I can see the checkbox dropdown only if I increase the row height. If I dont do that, am not seeing the checkboxes at all.

Can you tell me what am doing wrong here?

Thanks.

Community
  • 1
  • 1
Bala
  • 1,129
  • 1
  • 9
  • 23
  • Sorry, but I can't understand what you mean. Which relation should have multi-select dropdownlist to grouping? What you need to filter or to choose exactly? – Oleg Mar 31 '15 at 23:56
  • Say I am grouping by Country in jqGrid, say there are 2 groups (United States and Canada) and I have a dropdownlist to display cities. So for US, dropdown should have cities in US and for Canada, drop down should have citities in Canada. I can use a ColumnFormatter instead of using editoptions, but dont know what is the efficient/cleaner way to do this? – Bala Apr 01 '15 at 00:25
  • Sorry, but I can't follow you. What is in the dropdownlist? Cities? Countries? **Where there are exist the dropdownlist?** Do you need to filter by cities in the searching toolbar? You should clear explain what you need and **which relation** has the dropdownlist to grouping. – Oleg Apr 01 '15 at 00:30
  • ok. Sorry for being not so clear. Dropdownlist has Cities. But the groups is Countries (i.e I have grouped the records in the jqgrid by countries). I dont need a filter here. I need a multi-select dropdownlist in each row so that the user can check the cities he has visited in each country – Bala Apr 01 '15 at 00:35
  • Sorry, but I don't understand what you mean. I see any sense in multi-select dropdownlist only **during editing**. Just create any selects in the column have no sense because the choosed items in every row are not belong to the state of the grid. If the user click on the next page button or click on the column header to sort the data then all previously changes values will be lost. Moreover I see still no relation to grouping. If the size of comments are longer as the size of the text of the question it means that you should fix the text and describe all more clear, probably with pictures. – Oleg Apr 01 '15 at 00:43

1 Answers1

0

I figured this out. I am using bootstrap multiselect with jqGrid. There is a CSS class ".ui-jqgrid tr.jqgrow.td" which has overflow as hidden. So when you use bootstrap multiselect, when you click on the dropdown on the row, you will not see anything below the dropdown because they will be hidden. In order to see the dropdown check box, you need to modify overflow property to visible. Same should be done to .ui-jqgrid-bdiv.

Bala
  • 1,129
  • 1
  • 9
  • 23