Forum
Topic RSS
06:44
04/03/2010
OfflineHi Friends,
I m Mohanrao. I m working as a asp.net developer. Currently I m using jqgrid with webservices. I m unable to bind the data to jqgrid. I m getting the following Error:
Line:11, char:1486, Error: ']' Expected.
I m unable to findout the error. Pls give the solutions to rectify this error.
11:11
04/03/2010
OfflineHi ALL,
I’m using jqGrid in ASP.NET. jqGrid is literally good. As of now, I’m
using Handler(ashx) through WebService(asmx) to convert the DataTable into
JSON and display in the Grid.
I m Unable to Populate the data to jqgrid. I m getting the data from database to generichandlers page. But That data is not bind to grid .I m getting the Following Error on Jqgrid. I m unable to Solve it. The Error is look like this
Line:11
Char:1468
Error: Expected ']'
Code '0'
Pls Help me .. How to solve this error.
11:11
04/03/2010
OfflineHi ALL,
I’m using jqGrid in ASP.NET. jqGrid is literally good. As of now, I’m
using Handler(ashx) through WebService(asmx) to convert the DataTable into
JSON and display in the Grid.
I m Unable to Populate the data to jqgrid. I m getting the data from database to generichandlers page. But That data is not bind to grid .I m getting the Following Error on Jqgrid. I m unable to Solve it. The Error is look like this
Line:11
Char:1468
Error: Expected ']'
Code '0'
I m using IE6.0. but it runs in Firefox i didnt get any error. but didn't bind the data..
Pls Help me .. How to solve this error.
12:11
04/03/2010
Offlinesantosh said:
MohanRao,
Data is not populating because your json object is not build correctly use firebug to known how json data is being built and make sure you are not missing any ']' anywhere...! Checkout the json syntax
which you are sending for your jqgrid...!
My Code is look like this. pls tell the mistake
function GetMemberslist()
{
jQuery("#addgrid").jqGrid({
url: "Membership.ashx",
datatype:'json',
height: 400,
width:800,
colNames: ['Campus', 'Enrollno/EmpNo','Name','Issuedate','Expirydate','Address','Type','Amount'],
colModel: [
{ name: 'campus', index: 'campus', width: 100,align: 'center', editable: false, editoptions: { size: 10 }, editrules: { required: true} },
{ name: 'enrollno', index: 'enrollno', width: 100, align: 'left', editable: true, editoptions: { size: 10 }, editrules: { required: true} },
{ name: 'Name', index: 'Name', align: 'left',width: 100, editable: true, editoptions: { size: 10 }, editrules: { required: true} },
{ name: 'issuedate', index: 'issuedate', width: 100, align: 'left', editable: true, editoptions: { size: 10 }, editrules: { required: true} },
{ name: 'expirydate', index: 'expirydate', width: 100, align: 'left', editable: true, editoptions: { size: 10 }, editrules: { required: true} },
{ name: 'Address', index: 'Address', width: 100, align: 'left', editable: true, editoptions: { size: 10 }, editrules: { required: true} },
{ name: 'Type', index: 'Type', width: 100, align: 'left', editable: true, editoptions: { size: 10 }, editrules: { required: true} },
{ name: 'Amount', index: 'Amount',width: 100, align: 'left', editable: true, editoptions: { size: 10 }, editrules: { required: true} }
],
rowNum: 10,
rowList: [5, 10, 20, 50],
sortname: 'enrollno',
pager: jQuery('#pagerad'),
sortorder: "asc",
caption: "MemberShip Details",
editurl: "" ,
height:210
}).navGrid('#pagerad',
{edit:false,add:false,search:false,del:false}, //options
{height:300,reloadAfterSubmit: true }, // edit options
{height:300,reloadAfterSubmit: true }, // add options
{
//reloadAfterSubmit: true,url: "WebService.asmx/Delete" + a
// reloadAfterSubmit: true,url: "Services/LibService.asmx/Deletemembership"
}, // del options
{} // search options
);
$("#update").click(function(){
var gr = jQuery("#addgrid").getGridParam('selrow');
if( gr != null ){
//jQuery("#addgrid").editGridRow(gr,{height:280,reloadAfterSubmit:false});
var ret = $("#addgrid").getRowData(gr);
//GetNewsItem(ret.ID);
// alert(ret.enrollno);
ItemMouseClickmember(ret.enrollno)
}
else {
alert("Please Select Row");
}
});
$("#delete").click(function(){
var gr = jQuery("#addgrid").getGridParam('selrow');
if( gr != null ){
//jQuery("#addgrid").editGridRow(gr,{height:280,reloadAfterSubmit:false});
var ret = $("#addgrid").getRowData(gr);
// ItemDelete(ret.ID);
//alert(ret.ID);
ItemMouseClickmemberDelete(ret.enrollno);
}
else {
alert("Please Select Row");
}
});
}
Most Users Ever Online: 994
Currently Online:
45 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
Log In
Home

which you are sending for your jqgrid...!