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
My first Grid- Not working
15/09/2009
04:56
Avatar
pritisolanki
India
Member
Members
Forum Posts: 7
Member Since:
15/09/2009
sp_UserOfflineSmall Offline

Hi,

I installed jGrid and configured as per the steps explained at wiki.

My server.php is return output as expected.Secondly, the grid is coming without border and without data.I defined imagepath value as below.

var gridimgpath='css/ui-lightness/images';

Also, how one can debug whether data is coming or not? when i refresh my page i see "loading.." for very short time period and then empty grid no border nothing .

please help.

15/09/2009
05:19
Avatar
birt
Member
Members
Forum Posts: 20
Member Since:
20/11/2008
sp_UserOfflineSmall Offline

Firefox with Firebug add-on is useful for debuggning...

15/09/2009
05:39
Avatar
pritisolanki
India
Member
Members
Forum Posts: 7
Member Since:
15/09/2009
sp_UserOfflineSmall Offline

birt said:

Firefox with Firebug add-on is useful for debuggning…


Thanks . I am adding more details of my problem

{"page":"1","total":120,"records":"1200","rows":[{"id":"400000","cell":["400000","420000","K1010-44338","1","10.97","0","0","0"]},{"id":"400001","cell":["400001","420001","N1051-78338","1","11.62","0","0","0"]},{"id":"400002","cell":["400002","420002","L5000-62155","1","90.8","0","0","0"]},{"id":"400003","cell":["400003","420003","A6000-30766","1","4.57","0","0","0"]},{"id":"400004","cell":["400004","420003","A6060-49747","1","22.98","0","0","0"]},{"id":"400006","cell":["400006","420003","A6130-36134","1","4.5","0","0","0"]},{"id":"400009","cell":["400009","420003","N1068-28891","1","4.28","0","0","0"]},{"id":"400015","cell":["400015","420003","A1111-30633","1","1.5","0","0","0"]},{"id":"400021","cell":["400021","420003","A6110-11163","1","1.23","0","0","0"]},{"id":"400023","cell":["400023","420003","A6120-33013","1","0.2","0","0","0"]}]}

This is the response get echoed if I run server.php directly it means the server.php is working fine there is something else issue. Please help or suggest some pointer to debug.

15/09/2009
05:43
Avatar
pritisolanki
India
Member
Members
Forum Posts: 7
Member Since:
15/09/2009
sp_UserOfflineSmall Offline

Please note :

In server.php

$sidx = $_GET['sidx']; // get index row - i.e. user click to sort

$sord = $_GET['sord']; // get the direction

In my code I have give the name of fields.

15/09/2009
05:44
Avatar
pritisolanki
India
Member
Members
Forum Posts: 7
Member Since:
15/09/2009
sp_UserOfflineSmall Offline

Jgrid setup

    <script type="text/javascript">
        var gridimgpath='css/ui-lightness/images';

       $(document).ready(function(){
     jQuery("#list3").jqGrid({
            url:'server.php?rows=10&page=1&sidx=order_id&sord=order_item_id',
            datatype: "json",
             mtype: 'GET',
            colNames:['Order Item Id','Order Id','Sku', 'Qty', 'List Price','Shipping','Handling','Discount'],
            colModel:[
                {name:'order_item_id',index:'order_item_id', width:90},
                {name:'order_id',index:'order_id', width:90},
                {name:'sku',index:'sku', width:100},
                {name:'qty',index:'qty', width:100},
                {name:'list_price',index:'list_price', width:80, align:"right"},
                {name:'shipping',index:'shipping', width:80, align:"right"},
                {name:'handling',index:'handling', width:80,align:"right"},
                {name:'discount',index:'discount', width:150} ],
                rowNum:20,
                rowList:[10,20,30],
                pager: jQuery('#pager'),
                sortname: 'id',
                imgpath: gridimgpath,
                viewrecords: true,
                sortorder: "desc",
                caption:"JSON Example"    
        }).navGrid('#pager',{edit:false,add:false,del:false});
         });

    </script>

15/09/2009
07:04
Avatar
pritisolanki
India
Member
Members
Forum Posts: 7
Member Since:
15/09/2009
sp_UserOfflineSmall Offline

one more probelm:

The CSS is not coming fine specially of grid header!!!  Is following setting is correct

var gridimgpath='css/ui-lightness/images';

15/09/2009
13:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Follow this step by step

http://www.trirand.com/jqgridw.....first_grid

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.

17/09/2009
02:54
Avatar
pritisolanki
India
Member
Members
Forum Posts: 7
Member Since:
15/09/2009
sp_UserOfflineSmall Offline

I followed the same but in JSON. But it seems there is some other problem.Can you please guide me solving this.

18/09/2009
04:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Not sure if you follow the instructions. There is no more imgpath parameter, do you see this parameter in the link provided?

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:
37 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