Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
dataUrl + Toolbar is not populating colModel for select type
01/02/2011
10:23
Avatar
lucks
Mérida, Yucatan, México
New Member
Members
Forum Posts: 2
Member Since:
01/02/2011
sp_UserOfflineSmall Offline

Hi to everyone I having some issues with the toolbar and search filters for the colModel :

The code:

$('#jsonmap').jqGrid({
                        url:'solicitudes/listado',
                        datatype: 'json',

colNames:[
                     'ID',
                     'Solicitante',
                        
               ],

colModel:[

{name:'id',index:'id', width:30,align:'center'},

{name:'solicitante',index:'solicitante',width:130,align:'left',    search:true,sortable:true,stype:'select',
            searchoptions:{dataUrl:'solicitantes/getList',sopt: ['cn']},
             editable:true,edittype:'select',
             editoptions:{formatter: 'select',edittype:'select',    dataUrl:'solicitantes/getList',    defaultValue:'2',
      //value:':All;1:option1;2:option2;3:option3;4:option4;5:option5;6:option6' //only in this way,the select in the toolbar works
                                },

          formoptions:{elmprefix:'(*)', elmprefix:'    ' }
   },

// and the code for the toolbar or FilterGrid:

$('#t_jsonmap').height(25).jqGrid('filterGrid','jsonmap',{gridModel:true,gridToolbar:true});

So this is that I got it with the previous code:

It's like the dataUrl is not working properly in the search as toolbar.

You can check here -> http://lucks17.com/scs/

Only when I discoment the line:

defaultValue:'2',
     

value:':All;1:option1;2:option2;3:option3;4:option4;5:option5;6:option6'

the select appears in the search toolbar, why not accept dataURL,or is not working properly?

03/02/2011
19:47
Avatar
lucks
Mérida, Yucatan, México
New Member
Members
Forum Posts: 2
Member Since:
01/02/2011
sp_UserOfflineSmall Offline

I found a solution:

/jqgridwiki/doku.php?id=wiki:toolbar_searching

this is the correct way to add a search toolbar:

$('#jsonmap').jqGrid('filterToolbar',{searchOnEnter:true});

this was the wrong way :

$('#t_jsonmap').height(25).jqGrid('filterGrid','jsonmap',{gridModel:true,gridToolbar:true});
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
56 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information