Forum

July 12th, 2025
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
3.5.2 Integrated Search Toolbar issue: dataUrl option
31/08/2009
10:05
Avatar
sectionkeagle
Member
Members
Forum Posts: 8
Member Since:
31/08/2009
sp_UserOfflineSmall Offline

I am using the Integrated Search Toolbar, and I want to dynamically populate the select type filter in the header of one of my columns.  When the grid loads, I get a blank header in my column.  I have put a PHP mail function in the file I reference in the dataUrl property (filter.php), so I know that file is not being called.  Any ideas of what I am doing wrong? 

When the grid loads, everything else works fine.

Thanks in advance!

<script src="js/jquery-1.3.2.min.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>
<script src="js/grid.subgrid.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function(){
  var mygrid = $("#list").jqGrid({
    url:'portfolio.php',   
    datatype: 'xml',
    mtype: 'GET',
    colNames:['Name','Branch', 'Unit','Video'],
    colModel :[
      {name:'last_name', index:'last_name', width:365},
      {name:'branch', index:'branch', width:100, search:true, stype:'select', searchoptions:{dataUrl:'filter.php'} },
      {name:'abbreviation', index:'abbreviation', width:80},
      {name:'count_file', index:'count_file', width:80, align:'center'}      
    ],
    pager: '#pager',
    rowNum:27,
    rowList:[10,20,30],    
    sortname: 'last_name',
    sortorder: 'asc',
    viewrecords: true,
    caption: 'Journalist Portfolio',
    height: '600px',       
    subGrid: true,
    subGridUrl : "subgrid.php",
    subGridModel: [
      {
      name  : [''],
      width : [600],
      align : ['center']     
      }
    ]              
  });

  mygrid.filterToolbar(); 
});
</script>
 
</head>
<body>

    <table id="list"></table>
    <div id="pager"></div>
   
</body>
</html>

31/08/2009
10:21
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

What return your filter.php - as of documentation it should return valid html select

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

31/08/2009
10:27
Avatar
sectionkeagle
Member
Members
Forum Posts: 8
Member Since:
31/08/2009
sp_UserOfflineSmall Offline

Keeping it basic for testing purposes.

<?php

echo '<select><option value="1">One</option><option value="2">Two</option></select>';

?>

31/08/2009
10:28
Avatar
sectionkeagle
Member
Members
Forum Posts: 8
Member Since:
31/08/2009
sp_UserOfflineSmall Offline

Forgot to add my CSS:

<link rel="stylesheet" type="text/css" media="screen" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />

31/08/2009
10:51
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

If you use FireFox -  do you see the resonse in the console?

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

31/08/2009
12:14
Avatar
sectionkeagle
Member
Members
Forum Posts: 8
Member Since:
31/08/2009
sp_UserOfflineSmall Offline

Nope nothing.  The only request and response I am receiving is from the grid itself, and not the filter. Frown

04/09/2009
03:31
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Check the correct path in dataUrl - it is not jqGrid problem.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/09/2009
11:23
Avatar
sectionkeagle
Member
Members
Forum Posts: 8
Member Since:
31/08/2009
sp_UserOfflineSmall Offline

The path in dataUrl is correct.  Any other ideas? 🙁

11/09/2009
11:30
Avatar
sectionkeagle
Member
Members
Forum Posts: 8
Member Since:
31/08/2009
sp_UserOfflineSmall Offline

Ahh, found the solution!

Here

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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