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
reloadGrid not reload
02/01/2010
08:42
Avatar
jqgrid
New Member
Members
Forum Posts: 2
Member Since:
08/09/2009
sp_UserOfflineSmall Offline

Dear All, I'm using the code at "Search Big Sets" from the demo site to perform local jqgrid reload, however the message "Loading" appeared on the grid, but the data is not reload...

I found that the variable is not passing to the report_data_xml.php when executing report_data_gridReload().

Any clues ? below is my html code. Thanks

==html==

        <script type="text/javascript">
           $(function(){
              jQuery('#list6').jqGrid({
                url:'report_data_xml.php',
                datatype: 'xml',
                mtype: 'GET',
                sortable: true,
                colNames:['EMAIL', 'PROVIDER', 'PROVIDER COUNTRY', 'BEGIN DATE', 'UNITS'],
                colModel :[
                  {name:'EMAIL1', index:'EMAIL1', align:'center'},
                  {name:'PROVIDER', index:'PROVIDER', align:'center'},
                  {name:'PROVIDER_COUNTRY', index:'PROVIDER_COUNTRY', align:'center'},
                  {name:'BEGIN_DATE', index:'BEGIN_DATE', align:'right'},
                  {name:'UNITS', index:'UNITS', width:80, align:'right', formatter:'integer', formatoptions: {
                      thousandsSeparator: ","
                  }},
                ],
                pager: '#pager6',
                rowNum: 20,
                rowList:[10,20,30,50,100],
                height: 'AUTO',
                sortname: 'BEGIN_DATE',
                sortorder: 'asc',
                gridview: true,
                viewrecords: true,
                caption: 'Report Data'
              });
            });

           function report_data_gridReload(){
                 var report_date_from = $("#report_date_from").val();
                 var report_date_to = $("#report_date_to").val();
                 $("#list6").jqGrid('setGridParam',{url:"report_data_xml.php?report_date_from="+report_date_from+"&report_date_to="+report_date_to}).trigger("reloadGrid");
              };

</script>

<body>

         Date From: <input type="text" name="report_date_from" id="report_date_from" value="<?php echo $report_date_from; ?>">
        To : <input type="text" name="report_date_to" id="report_date_to" value="<?php echo $report_date_to; ?>">
         <input type="submit" value="Submit" onclick="return report_data_gridReload();">

<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3 STYLE="page-break-before: always">
    <COL WIDTH=256*>

    <TR>
        <TD WIDTH=100% VALIGN=TOP>
        <table id="list6" class="scroll" cellpadding="0" cellspacing="0"></table>
        <div id="pager6" class="scroll" style="text-align:center;"></div>    
        </TD>
    </TR>
</TABLE>

</body>

===end html====

03/01/2010
19:35
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Check what you return from server in this case.

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.

04/01/2010
05:12
Avatar
jqgrid
New Member
Members
Forum Posts: 2
Member Since:
08/09/2009
sp_UserOfflineSmall Offline

It returned all records, however when I try query the xml file with the variable "report_date_from" and "report_date_to", it is OK, when calling from the html page, it just show all the records even I enter the date range.

Thanks.

06/01/2010
09:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

This is very strange. Also do you see in FireBug if the parameters are passed?

How do you obtain the reported data - from get or from post array.

If you use postData to send parameters, does this work.

$(”#list6″).jqGrid('setGridParam',{postData:{report_date_from:report_date_from,report_date_to:report_date_to}})

...

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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