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
setRowData doesn't insert data correctly into column - please assist.
27/01/2010
13:28
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

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?

28/01/2010
17:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

29/01/2010
01:41
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

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!

01/02/2010
08:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

01/02/2010
12:43
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

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

01/02/2010
13:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

01/02/2010
20:38
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

Tony that fixed it!.. You are a star Smile

I set autoencode to false on my grid declaration and it did the trick!

Thank you!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
60 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