Forum


09:57

11/03/2010

hello,
I see the /jqgridwiki/doku.php?id=wiki:retrieving_data. It show how to use a local array data, and it said:
-----------------------------
<script> jQuery(document).ready(function(){
jQuery("#list").jqGrid({
datatype: 'clientSide',
colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'], colModel :[
{name:'invid',index:'invid', width:55, sorttype:'int'},
{name:'invdate',index:'invdate', width:90, sorttype:'date', datefmt:'Y-m-d'},
{name:'amount',index:'amount', width:80, align:'right',sorttype:'float'},
{name:'tax',index:'tax', width:80, align:'right',sorttype:'float'},
{name:'total',index:'total', width:80,align:'right',sorttype:'float'},
{name:'note',index:'note', width:150, sortable:false} ],
pager: '#pager',
rowNum:10,
viewrecords: true,
caption: 'My first grid'
});
...
});
</script>
-----------------------------
But, I think I need to have a grid on the page, then I could use jQuery("#list") to find it.
So I define a grid like this:
--------------------------
<trirand:JQGrid ID="jqGrid3" runat="server">
</trirand:JQGrid>
--------------------------
But at running time, it always report an error that there is needed a column at least. But I am adding the column use array in the jQuery("#list") code above? What's it mean?
yours,
Ivan
10:54

12/02/2010

What exactly is the problem you have? Perhaps you start here http://www.trirand.com/jqgridw.....first_grid and work make it work first then customise it later once you had it working.
hth,
lupin
Most Users Ever Online: 715
Currently Online:
43 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66