0

I am new to JQgrid and I am using xml string as data. i create the xml string on the backend and them pass it to the jqgrid.

I want to have some hyperlinks in my xml document but the problem is the jqgrid does not seem to recognize anything inside my cdata tags . I also tried to use xlink but when i include the xlink namespace i.e. as a part of my xmlstring, the grid fails to load !

I have to use xmlstring as otherwise i'll have to change my entire backend.

please help,

thanks

AbtPst
  • 7,778
  • 17
  • 91
  • 172

1 Answers1

0

I recommend you to use JSON instead of XML. There are no common way to parse complex XML data in JavaScript inside of web browser. jqGrid uses jQuery internally and jQuery have problems in processing of such simple XML constructs like XML namespaces. So you can't expect that XLink will be processed.

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • hi oleg, thanks for your response. I was able to do it on the jsp itself (using custom formatter), but its only a temporary solution. – AbtPst Jun 27 '13 at 20:37
  • what i really want to do is introduce links in the backend itself where the string is being generated. now, i tried usig a jsonstring with tags but the grid fails to load here as well ! – AbtPst Jun 27 '13 at 20:39
  • can you tell me how i should set up my jsonstring so that the grid will correctly process any hyperlinks ? thanks you – AbtPst Jun 27 '13 at 20:40
  • @user2334092: You don't posted any code examples. So it's difficult to understand you. It's better to place ho HTML fragments in the server response (in JSON or XML). Instead of that one can use [predefined formatters](http://www.trirand.com/jqgridwiki/doku.php?id=wiki:predefined_formatter#predefined_format_types) or [custom formatters](http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_formatter). To create column with hyperlinks you can use formatter `showlink` or use [dynamicLink](http://stackoverflow.com/a/9048483/315935) as alternative. – Oleg Jun 28 '13 at 05:00