Forum
12:28
28/09/2009
Hi ,
I'm working with XML datagrid view showing newspaper articles and now
added the some 3.6 new version features likes as "Resizing grid" however this
function not works in my code below :
function() {
jQuery('#list').jqGrid({
url: 'records.xml',
datatype: 'xml',
colNames: ['Id','Headline', 'body', 'NewsItemURL', 'PublicationDate', 'MediaName', 'DataSource'],
colModel: [
{ name: 'Id', index: 'Id', width: 5, hidden: true, editable: false, xmlmap: "Id",align:'right',editoptions:{readonly:true,size:5}},
{ name: 'Headline', index: 'Headline', width: 50,align: 'right',editable: true,editoptions:{size:10}},
{ name: 'body', index: 'body', width: 100, xmlmap:'body',editable: true,edittype:"textarea",editoptions:{rows:"10",cols:"20"}},
{ name: 'NewsItemURL', index: 'NewsItemURL', width: 100, editable: true, xmlmap: 'NewsItemURL',align: 'right',formatter:'link',editoptions:{size:50}},
{ name: 'PublicationDate', index: 'PublicationDate', width: 50, editable: true, xmlmap: 'PublicationDate', align: 'right', formatter: 'date',editoptions:{size:10}},
{ name: 'MediaName', index: 'MediaName',width: 50,editable: true,xmlmap: 'MediaName', align: 'right',editoptions:{size:50}},
{ name: 'DataSource', index: 'DataSource',width: 50,editable: true,xmlmap: 'DataSource', align: 'right',editoptions:{size:10}}
],
rownumbers: true,
pager: jQuery('#pager'),
sortname: 'Id',
viewrecords: true,
sortorder: 'desc',
xmlReader: {
root: 'Items',
row: 'Item',
repeatitems: false,
id: 'Id'
},
width: 600,
height:230,
caption: 'XML News',
editurl: "records.xml"
}).navGrid('#pager', { edit: true, add: true, del: false });
jQuery(”#list”).jqGrid('gridResize',{minWidth:350,maxWidth:800,minHeight:80, maxHeight:350});
});
I would like to report it as a bug however I'm not sure of some mistake in the code.
thanks.
23:07
Moderators
30/10/2007
Hello,
Thanks.
In order to work this you should
1. Be a sure that when you download the grid you marked the last item in the selection – jQuiery UI addons. The easy way to check this is when you open the jquery.jqGrid.min.js file and look in the Modules row at the beggining – the grid.jqueryui.js should be present.
2. Be a sure that you have inluded the jQuery UI and and the version you have include the resizable widget. Look into the documentation what jQuery UI widgets you need.
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.
13:10
28/09/2009
Thanks ,
Really I add in the <head> tag these scripts need :
<script src="js/jquery.jqGrid.js" type="text/javascript"></script>
<script src="js/grid.jqueryui.js" type="text/javascript"></script> <script src="js/jquery.jqGrid.min.js" type="text/javascript"></script> <script type="text/javascript"> $.jgrid.no_legacy_api = true; </script> however when I load this webpage , with the datagrid and menu together --
http://87.106.105.47:8084/osis/OSIS/jQuery_Grid.html
and I try the resizing grid , my Firebug reports following error :
" $.jgrid.extend is not a function
http://87.106.105.47:8084/osis/OSIS/js/grid.jqueryui.js
Line 404 "
Notice that it can resize first grid only loaded.
Djalma Bina.
04:33
Moderators
30/10/2007
Hello,
Setting this
<script type="text/javascript" >
$.jgrid.no_legacy_api = true;
</script>
Will cause to use the following convention
$("#mygrid").jqGrid("setGridWidth",800);
But not this
$("#mygrid").setGridWidth(800);
Also please carfully the docs what you should do when you use this flag
In you page you have mixed call - some the old way , some the new.
Convert your calls to the new way or turn off this flag.
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.
16:44
Moderators
30/10/2007
Hello,
This maybe occur if you have build the minified file using ant. I will check this.
Also if you use the download manager the first file is grid.base.
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.
07:40
I don't mean to hijack this thread but I am having a similar problem trying to resize my grid. And I think I have the wrong order in which I load the scripts. I have not been able to figure out what order these scripts should come in by following the documentation. I am using 3.6.2 I get an error msg from firebug saying uncaught exception: jqgrid – no such method: gridResize
url:'jqgrid/search_adv.php?q=1',
datatype: “json”,
width: 500,
colNames:['Store','Business Unit', 'SKU Count', 'Date'],
colModel:[
{name:'Store',index:'store_number', width:65, searchoptions:{sopt:['eq','ne','lt','le','gt','ge']}},
{name:'Businness Unit',index:'bu', width:80, align:”right”,searchoptions:{sopt:['eq','ne','lt','le','gt','ge']}},
{name:'SKU Count',index:'item_count', width:80,align:”right”,searchoptions:{sopt:['eq','ne','lt','le','gt','ge']}},
{name:'Date',index:'datetime', width:90, align:”right”,searchoptions:{sopt:['eq','ne','lt','le','gt','ge']}},
],
rowNum:10,
mtype: “POST”,
rowList:[10,20,30],
pager: '#s4pager',
sortname: 'store_number',
viewrecords: true,
rownumbers: true,
gridview : true,
sortorder: “desc”,
caption:”SKU Count of stores databases”
});
jQuery(”#s4list”).jqGrid('navGrid','#s3pager',
{
edit:false,add:false,del:false,search:true,refresh:true
},
{}, // edit options
{}, // add options
{}, //del options
{multipleSearch:true} // search options
);
jQuery(”#s4list”).jqGrid('gridResize',{minWidth:350,maxWidth:800,minHeight:100, maxHeight:350});
<link rel=”stylesheet” type=”text/css” media=”screen” href=”jqgrid/css/ui-lightness/jquery-ui-1.7.2.custom.css” />
<link rel=”stylesheet” type=”text/css” media=”screen” href=”jqgrid/css/ui.jqgrid.css” />
<script src=”jqgrid/js/jquery.js” type=”text/javascript”></script>
<script src=”jqgrid/js/jquery.layout.js” type=”text/javascript”></script>
<script src=”jqgrid/js/i18n/grid.locale-en.js” type=”text/javascript”></script>
<script src=”jqgrid/development-bundle/ui/ui.core.js” type=”text/javascript”></script>
<script src=”jqgrid/development-bundle/ui/ui.resizable.js” type=”text/javascript”></script>
<script src=”jqgrid/js/jquery.jqGrid.min.js” type=”text/javascript”></script>
<script src=”jqgrid/js/jquery-ui-1.7.2.custom.min.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.base.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.common.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.formedit.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.inlinedit.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.celledit.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.subgrid.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.treegrid.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.custom.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.postext.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.tbltogrid.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.setcolumns.js” type=”text/javascript”></script>
<script src=”jqgrid/src/grid.import.js” type=”text/javascript”></script>
<script src=”jqgrid/src/jquery.fmatter.js” type=”text/javascript”></script>
<script src=”jqgrid/src/JsonXml.js” type=”text/javascript”></script>
<script src=”jqgrid/src/jquery.searchFilter.js” type=”text/javascript”></script>
</head>
<div id=”s4pager” {margin:0px;} ></div>
<script src=”jqgrid/js/search4.js” type=”text/javascript”></script>
14:41
Moderators
30/10/2007
Hello,
It seems that you do not have included in the download the grid.jqueryui.js file. Check this box in the download manager. It is at bottom.
Some othe note. You do not need to include the src code if you have already included the jqGrid min file. This will cause a lot of problems maybe.
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.
Most Users Ever Online: 715
Currently Online:
76 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