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_TopicIcon
Column Chooser not working
03/04/2011
02:48
Avatar
dmdfalkas
Member
Members
Forum Posts: 4
Member Since:
03/04/2011
sp_UserOfflineSmall Offline

Hi there¡

I'm adding column chooser to my jqgrid, but i can't see it working.

I have read the warnings about import (css, js) and i think it's all ok, but...

My jqgrid:

$(function(){
  $("#list1").jqGrid({
        url:'./otro2.php',
        datatype: "xml",
        colNames: ['Title','Subtitle','Composer', 'Source', 'Year','Key','Fronimo','PDF','Midi','Tab'],
        colModel:
          [
            {name:'Title',index:'title', width:70, sorttype:"string",searchoptions:{sopt: ['cn']}},
            {name:'Subtitle', index:'subtitle', width:70, sorttype:"string",searchoptions:{sopt: ['cn']},hidden: true},
            {name:'Composer',index:'composer', width:50, sorttype:"string",searchoptions:{sopt: ['cn']}},            
            {name:'Source',index:'source', width:100, sorttype:"string",searchoptions:{sopt: ['cn']}},
            {name:'Year',index:'date', width:10, sorttype:"string",searchoptions:{sopt: ['cn']}},            
            {name:'Key',index:'key', width:10,sorttype:"string",searchoptions:{sopt: ['cn']}},        
            {name:'Fronimo',index:'Fronimo', width:15,sortable:false,search:false,formatter:ft3Formater},
            {name:'PDF',index:'PDF', width:10,sortable:false,search:false,formatter:pdfFormater},        
            {name:'Midi',index:'Midi', width:10,sortable:false,search:false,formatter:midiFormater}    ,
            {name:'Tab',index:'Tab', width:10,sortable:false,search:false,formatter:tabFormater}            
          ],
        autowidth: true,
        rowList:[100,200,500],
        pager: '#pager1',
        scrollOffset:0,
        toppager: true,
        loadtext: '<br/>&nbsp;&nbsp;&nbsp;&nbsp; ::::::::: searching :::::::::: &nbsp;&nbsp;&nbsp;&nbsp; <br/><br/>',
        altRows: true,
        rowNum:50,
        viewsortcols: [true,'horizontal',true],
        height:500,
        viewrecords: true,
        sortable:true,
        hoverrows: false,
        gridview: true
      });
      
      jQuery("#list1").jqGrid('navGrid','#pager1',{add:false,edit:false,del:false,view:true,search:true,cloneToTop:true, viewtext: "View selected tablature  ",searchtext:"Search tablatures  ",refreshtext:"Clear search parameters  "},
                  {}, // edit options
                  {}, // add options
                  {}, // del options
                  {}, // search options
                  {   // view options
                      beforeShowForm: function(form) {
                          $("tr#trv_Subtitle",form[0]).show();
                      },
                      afterclickPgButtons: function(whichbutton, form, rowid) {
                          $("tr#trv_Subtitle",form[0]).show();
                      }
                  });
      
    jQuery("#list1").jqGrid('navButtonAdd','#pager1',{ caption: "Columns", title: "Reorder Columns", onClickButton : function (){ jQuery("#list1").jqGrid('columnChooser'); } });

Any Idea¡¡

03/04/2011
12:50
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You wrote that you have read about the importance of the CSS and JavaScripts to make columnChooser working, but you don't include the part of your code. I think your error in the part.

You should verify that you include ui.multiselect.css, jquery-ui.js, ui.multiselect.js and your select "jQuiery UI addons" during jqGrid dounloading. You can verify this if you open jquery.jqGrid.min.js which you currently use and search for grid.jqueryui.js inside of the comment line at the begining of jquery.jqGrid.min.js.

Best regards
Oleg

P.S. You can compare your code with the old example.

03/04/2011
23:35
Avatar
dmdfalkas
Member
Members
Forum Posts: 4
Member Since:
03/04/2011
sp_UserOfflineSmall Offline

Thanks for your quick reply...

<link rel="stylesheet" type="text/css" media="screen" href="css/south-street/jquery-ui-1.8.11.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.multiselect.css" />

<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/ui.multiselect.js" type="text/javascript"></script>
<script src="js/grid.jqueryui.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>

And i've checked that grid.jqueryui.js is inside of the comment line at the begining of jquery.jqGrid.min.js.

But still not working.

You could see it here: http://www.cuerdaspulsadas.es/.....ngine.html

I click button "columns" (bottom) but it doesn't do anything.

04/04/2011
08:37
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

The file js/grid.jqueryui.js is not the same as jquery-ui.js (http://ajax.googleapis.com/aja.....uery-ui.js) which I wrote you. The file jquery-ui.js must be jQuery UI file.

Best regards
Oleg 

04/04/2011
22:27
Avatar
dmdfalkas
Member
Members
Forum Posts: 4
Member Since:
03/04/2011
sp_UserOfflineSmall Offline

Solved¡ i was misunderstanding the instructions.

Thanks for your help¡

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
72 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