Forum
20:45
11/09/2009
Hi,
I am exporting and importing the grid configuration in XML format and it is not working. The JSON format is working, but I need the XML format.
My jqGrid version is 3.8 beta.
The Javascript error is:
xml is undefined
if (xml.nodeType === 9) {
I am calling the import method using:
jqGridImport({"imptype":'xmlstring', "impstring":myConfig});
the var myConfig has exactly the same XML which jqGridExport method printed.
I tested using {"imptype":'xml', "impurl":myUrl} and it also does not work.
Any idea?
11:53
Moderators
30/10/2007
HEllo,
Could you please send us the generated string, so that we look what is?
Thank you
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
15:14
11/09/2009
"<grid><url>index.php?op=113</url><height>auto</height><page>1</page><rowNum>10</rowNum><rowTotal/><records>18711</records><pager>#grid1_paginacao</pager><pgbuttons>true</pgbuttons><pginput>true</pginput> <colModel> <label>Id</label> <name>idteste</name> <hidden>true</hidden> <width>150</width> <title>true</title> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Nome</label> <name>nome</name> <width>223</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>CPF</label> <name>cpf</name> <align>right</align> <width>112</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Valor</label> <name>valor</name> <align>right</align> <formatter>currency</formatter> <width>112</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Nota</label> <name>nota</name> <align>right</align> <formatter>number</formatter> <width>112</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Peso</label> <name>peso</name> <align>right</align> <formatter>number</formatter> <formatoptions> <decimalPlaces>3</decimalPlaces></formatoptions> <width>112</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Data Nasc.</label> <name>datanascimento</name> <formatter>date</formatter> <width>112</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Horário Nasc.</label> <name>horarionascimento</name> <width>112</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Observação</label> <name>observacao</name> <width>112</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Ativo</label> <name>ativo</name> <stype>select</stype> <editoptions> <value>:;t:Sim;f:Não</value></editoptions> <searchoptions> <sopt>eq</sopt> </searchoptions> <width>112</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search></colModel> <colModel> <label>Estado</label> <name>estado</name> <width>74</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Município</label> <name>municipio</name> <width>74</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search> <stype>text</stype></colModel> <colModel> <label>Situação</label> <name>situacao</name> <stype>select</stype> <editoptions> <value>:;P:Pel;Q:Quel;R:Rel</value></editoptions> <searchoptions> <sopt>eq</sopt> </searchoptions> <width>111</width> <title>true</title> <hidden>false</hidden> <resizable>true</resizable> <sortable>true</sortable> <search>true</search></colModel> <rowList>10</rowList> <rowList>30</rowList> <rowList>50</rowList> <rowList>100</rowList> <colNames>Id</colNames> <colNames>Nome</colNames> <colNames>CPF</colNames> <colNames>Valor</colNames> <colNames>Nota</colNames> <colNames>Peso</colNames> <colNames>Data Nasc.</colNames> <colNames>Horário Nasc.</colNames> <colNames>Observação</colNames> <colNames>Ativo</colNames> <colNames>Estado</colNames> <colNames>Município</colNames> <colNames>Situação</colNames> <sortorder>asc</sortorder><sortname>nome</sortname><datatype>json</datatype><mtype>GET</mtype><altRows>false</altRows><selarrrow>__EMPTY_ARRAY_</selarrrow> <savedRow>__EMPTY_ARRAY_</savedRow> <shrinkToFit>true</shrinkToFit><xmlReader> <root>rows</root> <row>row</row> <page>rows>page</page> <total>rows>total</total> <records>rows>records</records> <repeatitems>true</repeatitems> <cell>cell</cell> <id>[id]</id> <userdata>userdata</userdata> <subgrid> <root>rows</root> <row>row</row> <repeatitems>true</repeatitems> <cell>cell</cell></subgrid></xmlReader><jsonReader> <root>rows</root> <page>page</page> <total>total</total> <records>records</records> <repeatitems>true</repeatitems> <cell>cell</cell> <id>id</id> <userdata>userdata</userdata> <subgrid> <root>rows</root> <repeatitems>true</repeatitems> <cell>cell</cell></subgrid></jsonReader><subGrid>false</subGrid><subGridModel>__EMPTY_ARRAY_</subGridModel> <reccount>10</reccount><lastpage>1872</lastpage><lastsort>1</lastsort><selrow/><beforeSelectRow/><onSelectRow/><onSortCol/><ondblClickRow/><onRightClickRow/><onPaging/><onSelectAll/><loadComplete/><gridComplete/><loadError/><loadBeforeSend/><afterInsertRow/><beforeRequest/><onHeaderClick/><viewrecords>true</viewrecords><loadonce>false</loadonce><multiselect>false</multiselect><multikey>false</multikey><editurl/><search>false</search><caption>Exemplo de grid agrupado</caption><hidegrid>false</hidegrid><hiddengrid>false</hiddengrid><postData> <_search>false</_search> <nd>1285071007003</nd> <rows>10</rows> <page>1</page> <sidx>nome</sidx> <sord>asc</sord></postData><userData/><treeGrid>false</treeGrid><treeGridModel>nested</treeGridModel><treeReader/><treeANode>-1</treeANode><ExpandColumn/><tree_root_level>0</tree_root_level><prmNames> <page>page</page> <rows>rows</rows> <sort>sidx</sort> <order>sord</order> <search>_search</search> <nd>nd</nd> <id>id</id> <oper>oper</oper> <editoper>edit</editoper> <addoper>add</addoper> <deloper>del</deloper> <subgridid>id</subgridid> <npage/> <totalrows>totalrows</totalrows></prmNames><forceFit>false</forceFit><gridstate>visible</gridstate><cellEdit>false</cellEdit><cellsubmit>remote</cellsubmit><nv>0</nv><loadui>enable</loadui> <toolbar>false</toolbar> <toolbar>__EMPTY_STRING_</toolbar> <scroll>false</scroll><multiboxonly>false</multiboxonly><deselectAfterSort>true</deselectAfterSort><scrollrows>false</scrollrows><autowidth>false</autowidth><scrollOffset>18</scrollOffset><cellLayout>5</cellLayout><subGridWidth>20</subGridWidth><multiselectWidth>20</multiselectWidth><gridview>true</gridview><rownumWidth>25</rownumWidth><rownumbers>false</rownumbers><pagerpos>center</pagerpos><recordpos>right</recordpos><footerrow>false</footerrow><userDataOnFooter>false</userDataOnFooter><hoverrows>true</hoverrows><altclass>ui-priority-secondary</altclass> <viewsortcols>true</viewsortcols> <viewsortcols>vertical</viewsortcols> <viewsortcols>true</viewsortcols> <resizeclass>__EMPTY_STRING_</resizeclass><autoencode>false</autoencode><remapColumns>__EMPTY_ARRAY_</remapColumns> <ajaxGridOptions/><direction>ltr</direction><toppager>false</toppager><headertitles>false</headertitles><scrollTimeout>40</scrollTimeout><data>__EMPTY_ARRAY_</data> <_index/><grouping>false</grouping><groupingView> <groupField>estado</groupField> <groupOrder>asc</groupOrder> <groupText><b>{0}</b></groupText> <groupColumnShow>true</groupColumnShow> <groupSummary>true</groupSummary> <showSummaryOnHide>false</showSummaryOnHide> <sortitems>__EMPTY_ARRAY_</sortitems> <sortnames>__EMPTY_ARRAY_</sortnames> <groupDataSorted>true</groupDataSorted> <summary>__EMPTY_ARRAY_</summary> <summaryval>__EMPTY_ARRAY_</summaryval> <plusicon>ui-icon-circlesmall-plus</plusicon> <minusicon>ui-icon-circlesmall-minus</minusicon> <groupCollapse>false</groupCollapse></groupingView><recordtext>{2} registros encontrados</recordtext><emptyrecords>Nenhum registro encontrado</emptyrecords><loadtext>Carregando...</loadtext><pgtext>Página {0} de {1}</pgtext><width>1438</width><id>grid1_grid</id><keyIndex>false</keyIndex><localReader> <root>rows</root> <page>page</page> <total>total</total> <records>records</records> <repeatitems>false</repeatitems> <cell>cell</cell> <id>id</id> <userdata>userdata</userdata> <subgrid> <root>rows</root> <repeatitems>true</repeatitems> <cell>cell</cell></subgrid></localReader><tblwidth>1438</tblwidth><disableClick>false</disableClick> <_nvtd>586</_nvtd> <_nvtd>40</_nvtd> <totaltime>21</totaltime><knv/></grid>"
21:34
Moderators
30/10/2007
HEllo,
Thank you for posting the code. I will check it and let you know.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
37 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