Forum
00:09
09/08/2012
Hi,
I have a jqgrid that looks like this
$("#cclist").jqGrid({ //url: ResolveUrl() + '/CC_DoctorList', datatype: 'local', // postData: { "CaseNo": CaseNo }, mtype: 'POST', ajaxGridOptions: { contentType: 'application/json; charset=utf-8' }, serializeGridData: function (jsondata) { return JSON.stringify(jsondata); }, jsonReader: { repeatitems: false, root: "d.rows", page: "d.page", total: "d.total", records: "d.records" }, colNames: ['Remove', 'DoctorID', 'Last Name', 'First Name', 'Address'], colModel: [ { name: 'RemoveAction', width: 80, fixed: true, sortable: false, resize: false, align: "center" }, { name: 'ID', index: 'ID', width: 50, sortable: false, hidden: false }, { name: 'LastName', index: 'LastName', width: 100, hidden: false, sortable: false }, { name: 'FirstName', index: 'FirstName', width: 100, hidden: false, sortable: false }, { name: 'Address', width: 420, hidden: false, sortable: false, jsonmap: function (obj) { var street = obj.Address.Address1 var city = obj.Address.City var state = obj.Address.StateProvince var zip = obj.Address.PostalCode if (street != '') { street = street + ', ' } if (city != '') { city = city + ', ' } if (state != '') { state = state + ', ' } var Address = street + city + state + zip return Address } }], gridComplete: function () { addDeleteIcon(); }, pager: '#ccpager', rowNum: 100, rowList: [100, 200], sortname: 'LastName', sortorder: 'desc', viewrecords: true, gridview: true, height: "100%", caption: 'Send Copy of Report To:', multiselect: false, shrinkToFit: false, loadui: "disabled" })//.jqGrid('navGrid', '#ccpager', { edit: false, add: true, del: false, search: true });
I have coming from the db in an object or an array. Now I need to be able to populate or databind the data to the above jqGrid.
This is the first time I am using jqGrid to use in my project. Can any one please help me how to do I go about it?
I use ASP.NET/vb.net.
Thanks in advance,
Learner
Most Users Ever Online: 715
Currently Online:
31 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