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
subgrid is not displaying the data it gets.
18/12/2012
04:32
Avatar
tedbyers
New Member
Members
Forum Posts: 2
Member Since:
31/01/2012
sp_UserOfflineSmall Offline

jqgrid is quickly becoming one of my favourite grids, but, sometimes I have a little trouble.  Here is how my latest grid is created:

$(function() {

$( "#transhist" ).jqGrid({
url:'/cgi-bin/transaction.history.pl?tid=93e9113ad026a226f3f2dea0afdc6f9e05dc3933authREITUMU',
datatype: 'xml',
mtype: 'GET',
colNames:['Transaction Id','Date', 'Transaction Type', 'Transaction result', 'Amount'],
colModel :[
{name:'transaction_id',index:'transaction_id',width:120},
{name:'transaction_date',index:'transaction_date',width:180,align:'center'},
{name:'action_type',index:'action_type',width:120},
{name:'success',index:'success',width:100,align:'center'},
{name:'amount',index:'amount',width:80,align:'right'},
],
pager: '#transpager',
altRows: true,
rowNum:15,
rowList:[15,30,45],
sortname: 'transaction_date',
sortorder: 'desc',
pgbuttons: true,
gridview: true,
width: 950,
height: 400,
onSelectRow: function (id) {
var grid = jQuery('#transhist');
var sel_id = grid.jqGrid('getGridParam', 'selrow');
var cont = grid.getCell(sel_id, 'transaction_id');
},
multiselect: false,
subGrid : true,
subGridUrl: '/cgi-bin/transaction.history.subgrid.pl',
subGridModel: [{ name : ['Transaction Id','Date', 'Transaction Type', 'Transaction result', 'Amount'],
width : [120,180,120,100,80]}],
caption: 'Basic Transaction Data'
});
});

This displays OK, unless I try to get the subgrid for one of my transactions.  Then, I get only the subgrid's column titles and no data.  This is expected for most transactions, as few have multiple trnsactions.  However, here is a sample of the XML my perl CGI script produces.

<?xml version='1.0' encoding='latin1'?>

<rows>

<row>

<cell>1a294c474ef117d52b1dd3aba0b60f34606d822ccapRITUMI</cell>

<cell>2012-12-11 15:50:07</cell><cell>capture</cell><cell>1</cell>

<cell>15.00</cell>

</row>

</rows>

Yet, even with this XML, I get only the subgrid's column headers and no data.

This is the last bit of the puzzle for this particular page.  All else is working flawlessly, including making use of our customized jQuery CSS files.

How do I get jqgrid's subgrid to actually display the data when there is data?  Or, equally likely; what mistake did I make in setting up this subgrid?

Thanks

Ted

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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