Forum


13:28

13/01/2010

I have an sj:grid with 1 column say & set onCompleteTopics="complete" to call a function after grid is loaded.
The complete function should call setRowData and insert the data properly.
I call jQuery("#gridedittable").jqGrid('setRowData',ret.rn,{note:"<img src='images/user1.gif'/>"});
on my column:
<sj:gridColumn name="note" index="note" title="note" sortable="false" width="300"/>
This should insert an image into the column. Instead it just inserts the text into the column.
The grid demo at http://www.trirand.com/blog/jq.....qgrid.html places the actual image into the field. (click on menu item: Manipulating->Grid Data)
However my column will get added only data in the column itself & not the image:<img src='images/user1.gif'/>
Anyone with any ideas why it works in that example and not in my one? could this be a bug in the sjquery plugin for struts?
17:47

Moderators
30/10/2007

Hello,
Be a sure that this is the correct path to the image. This can be seen very well in IE browsers - if the path to the image is not correct you will see only image frame.
Best 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.
01:41

13/01/2010

Hi Tony
Thanks for your reply. The thing is I am not seeing the image frame either. All I see in the column field is the plain text: img src='images/user1.gif'/
Assuming the image path is correct should my jquery statment below include the actual image or is the syntax wrong?:
jQuery("#gridedittable").jqGrid('setRowData',ret.rn,{note:"<img src='images/user1.gif'/>"});
I Appreciate your expert help!
08:47

Moderators
30/10/2007

Hello,
This is very strange, because we use tha same code into the demo and the result is diffrent.
Also somthing else shoyuld brake the result. Any other grid options?
Which version is used and in which browsers is this?
Best 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.
12:43

13/01/2010

Hi
I am using the strut2-jquery pugin 1.8.1. (will be upgrading shortly to plugin 1.8.2 but dont think it will fix this issue).
I posted this as a bug on the jquery plugin but it was rejected as invalid.
http://code.google.com/p/strut..... will show you an image as to what appears & gives extra info.
I was told to ask about this issue in this forum.
This happens on both IE 8 & Firefox 3.6
Maybe it could be a bug on the plugin js file itself. Although I am not sure. Or maybe its something I am doing.
Below is all I have in my jsp code similar to the one posted in that forum:
<script type="text/javascript">
(
.....
$.subscribe('complete', function(request) {
jQuery("#gridedittable").jqGrid('setRowData',1,{note:"<img src='images/user1.gif'/>"});
});
</script>
<sj:grid id="gridedittable" caption="%{getText('label.document')}"
dataType="json" href="%{remoteurl}" pager="true" navigator="true"
navigatorSearchOptions="{sopt:['eq','ne','lt','gt']}"
navigatorAddOptions="{height:500,reloadAfterSubmit:true,closeAfterAdd:true}"
navigatorEditOptions="{height:500,reloadAfterSubmit:true,closeAfterEdit:true}"
navigatorDeleteOptions="{height:200,reloadAfterSubmit:true}"
navigatorEdit="false"
navigatorView="false"
navigatorDelete="true"
gridModel="gridModel"
rowList="15,30,45"
rowNum="15"
editurl="%{editurl}"
editinline="true"
filter="true"
rownumbers="true"
onCompleteTopics="complete" >
<sj:gridColumn name="note" index="note" title="note" sortable="false" width="300"/> </sj:grid>
Thanks for your help
13:01

Moderators
30/10/2007

Hello,
What is the default setting for the autoencode option of this plugin
Try to set autoencode to false
Best 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:
82 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