I want to bind the JQgrid (in a Classic ASP page) with XML response I am getting from a VB6 COM .dll. All attempts to do so has failed so far unfortunately. I'd highly appreciate any help on this matter. Here is the that I have in my classic ASP page. All of the code is in one single .ASP file.
<script>
$(function () {
jQuery("#grid_top").jqGrid({
datatype: 'xmlstring',
datastr: strResponse, //
pager: '#pager',
height: 250,
colNames:['Order ID','Segment', 'Terminal','Product','Delivered','Customer','Gross','Manifest ID','Notes'],
colModel:[
{name:'OrderID',index:'orderId', width:100, xmlmap: function (obj) {
return $(obj).attr('OrderId');}},
{name:'Segment',index:'segment', width:60, xmlmap: function (obj) {
return $(obj).attr('RouteSegment');}},
{name:'Terminal',index:'terminal', width:100, xmlmap: function (obj) {
return $(obj).attr('TerminalId');}},
{name:'Product',index:'product', width:80, align:"right",xmlmap: function (obj) {
return $(obj).attr('ProductId');}},
{name:'Delivered',index:'delivered', width:100, align:"right", xmlmap: function (obj) {
return $(obj).attr('DeliveredTimestamp');}},
{name:'Customer',index:'customer', width:150,align:"right", xmlmap: function (obj) {
return $(obj).attr('Customer');}},
{name:'Gross',index:'gross', width:100, xmlmap: function (obj) {
return $(obj).attr('Gross');}},
{name:'Manifest ID',index:'gross', width:100,
xmlmap: function (obj) {
return $(obj).attr('ManifestId');}},
{name:'Notes',index:'note', width:150, sortable:false}
],
xmlReader: { root: "Data", row: "Row", repeatitems: false },
multiselect: true,
caption: "Deliver Orders for Route:"
});
</script>
Here is the code which is calling COM method
Dim strRequest :strRequest = "" strRequest = strRequest & " METHOD='FetchOrder'/>" objMSXML1.async = False objMSXML1.validateOnParse = True objMSXML1.setProperty "SelectionLanguage", "XPath" objMSXML1.loadXML strRequest strResponse = objManifest1.XMLDriver(CStr(strConnectionString1), objMSXML1.xml)
%>
XML Format in (strResponse)
I am getting the XML response back from the COM method but I don't know how to bind this XML string to the JQGrid. What am I doing wrong here ? Highly appreciate any input...
Aucun commentaire:
Enregistrer un commentaire