Forum


17:12

11/08/2010

Hello.
The problem is that I can not display the data in the jqGrid. Maybe I dodn't understand something or I'm on wrong way of integration jqGrid into .net application.
If I change URL (url: 'data.xml',) to use XML file as data provider I can see data in the grid. Both files (data.xml and data.aspx) have the same response in the browser.
Aspx file with grid.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridForm.aspx.cs" Inherits="VL.Apollo.WebForm1" %>
...
<table id="list1"></table>
<div id="pager1"></div>
<script type="text/javascript">
jQuery().ready(function (){
jQuery("#list1").jqGrid({
url: 'data.aspx',
datatype: "xml",
colNames:['Inv No','Name'],
colModel:[
{name:'id',index:'id', width:75},
{name:'name',index:'name', width:100}
],
rowNum:10,
autowidth: true,
rowList:[10,20,30],
pager: jQuery('#pager1'),
sortname: 'id',
viewrecords: true,
sortorder: "desc",
caption:"XML Example" }).navGrid('#pager1',{edit:false,add:false,del:false});
});
</script>
...
Aspx with data
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="data.aspx.cs" Inherits="VL.Apollo.WebForm2" %>
<?xml version ='1.0' encoding='utf-8'?>
<rows>
<page>1</page>
<total>1</total>
<records>2</records>
<row id='1'>
<cell>1</cell>
<cell>name1</cell>
</row>
<row id='2'>
<cell>2</cell>
<cell>name2</cell>
</row>
</rows>
Most Users Ever Online: 715
Currently Online:
69 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