Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
import XMLSTRING problem
11/10/2012
18:02
Avatar
ciao
Member
Members
Forum Posts: 4
Member Since:
11/10/2012
sp_UserOfflineSmall Offline

hi i do a little program that export one table in XMLSTRING and after i try to import that file but it doesn't work

this is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jqGrid Example</title>
 
<link rel="stylesheet" type="text/css" media="screen" href="css/ui-lightness/jquery-ui-1.8.9.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
 
<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>

<script type="text/javascript">
  $(document).ready(function(){

        $("#list").jqGrid
        ({
            url: 'myxml.xml',
            datatype: "xml",
            colNames:["Squadra","Giocate","Vinte","Perse","Pareggiate","Punti"],
            colModel :[
                          {name:'squadra', index:'squadra', width:100, search:true, xmlmap:"squadra"},
                          {name:'giocate', index:'giocate',width:100, xmlmap:"giocate"},
                          {name:'vinte', index:'vinte', width:100, xmlmap:"vinte"},
                          {name:'perse', index:'perse', width:100, xmlmap:"perse"},
                          {name:'pareggiate', index:'pareggiate', width:100, xmlmap:"pareggiate"},
                          {name:'punti', index:'punti', width:100, xmlmap:"punti"}
                      ],     
            height:100,
            rowNum:10,
            rowList:[10,20,30],
            pager : "#pager",
            viewrecords: true,
            imgpath: 'css/ui-lightness/images',
            loadonce: true,
            xmlReader: {
                        root : "NewDataSet",
                        row: "Table",
                        repeatitems: false,
                        id: "squadra"
                        },
            sortorder: "punti",
            gridview: true,
            caption:'Classifica'
    
        });
        //$("#list").jqGrid('GridUnload');
        
        var asd
        asd = $("#list").jqGridExport({exptype: "xmlstring"});

        alert(""+asd);

        $("#list").jqGrid('filterToolbar', {stringResult: true, searchOnEnter: false, defaultSearch:"cn"});
        $("#list2").jqGridImport(
        {
        imptype : 'xmlstring',
        impstring : asd ,
            xmlGrid :
                    { // describes from where to read the xml configuration and from where the data if any
                        config : "roots>grid",
                        data: "roots>rows"
                    },
            jsonGrid :
                    { // describes from where to read the json configuration and from where the data if any
                        config : "grid",
                        data: "data"
                    }    
        
        
});
    });

    
    
    
    
    
</script>

 
</head>
<body>
<center>
<table id="list"></table>
<div id="pager"></div>

<br><br><br><br>asd
<table id="list2"></table>

</center>
</body>
</html>

when i start i receive this message:

TypeError: a is undefined
[Image Can Not Be Found]
..."},json2xml:function(a,b){var g=function(a,b,e){var d="",f,i;if(a instanceof Arr...

help me PlzCryCryCryCry

12/10/2012
11:39
Avatar
ciao
Member
Members
Forum Posts: 4
Member Since:
11/10/2012
sp_UserOfflineSmall Offline

the right error is :

TypeError: a is undefined
file: jquery.jqGrid.min.js
Line 491

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
50 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information