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
Input option image isn't showing the picture
07/12/2009
17:29
Avatar
edgar9000
Member
Members
Forum Posts: 14
Member Since:
22/08/2009
sp_UserOfflineSmall Offline

Hi,

Im trying to use the jqgrid setting the editoption of a cell to show a image the problem is that the image isn't displayed I'd tried with all the posible path to the image even with a url path but I can't see the image.

What I have to do to see the image I'm trying to reference??

jQuery("#list2").jqGrid({
              url: 'DynamicGridData.php',
              datatype: 'json',
              width:810,
              height:'auto',
              mtype: 'GET',
              colNames: ['xx', 'xxx', 'xxx','xxx','xxx','xxx', 'xx'],
              colModel: [
                            { name: 'xx', index: 'Id', width: 60,hidden:true, align: 'left', editable:false },
                            { name: 'xx', index: 'xx', width: 50, align: 'left', editable:true, edittype: "select"},
                            { name: 'xxx', index: 'xxx', width: 90, align: 'left', editable:true, editoptions:{size:10}, editrules: { required: true }},                          
                            { name: 'xxx', index: 'xxx', width: 10, align: 'right', editable:true, editoptions:{size:10}, editrules: { required: true, minValue: 0, number: true } },
                            { name: 'xxx', index: 'xxx', width: 18, align: 'right', editable:true, editoptions:{size:10}, editrules: { required: true, minValue: 0, number: true  } } ,
                            { name: 'xxx', index: 'xxx', width: 20, align: 'right', editable:false, editoptions:{size:10} },
                            { name: 'xxx', index: 'xxx', width: 18, editoptions: { src:'../../Content/images/search.png', alt:'Alt text' } }
                         ],
              pager: jQuery('#pager'),
              rowNum: 10,
              rowList: [5, 10, 20, 50],
              sortname: 'Id',
              sortorder: "desc",
              loadonce: false,
              multiselect: true,
              viewrecords: true,
              editurl: 'EditData.php',
              caption: 'xxx'
              });

08/12/2009
18:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You missed the edittype option - set it to image - i.e edittype:'image' , editoptions:{....}

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.

17/12/2009
17:13
Avatar
edgar9000
Member
Members
Forum Posts: 14
Member Since:
22/08/2009
sp_UserOfflineSmall Offline

Hi,

I've added the edittype:'image' before the editoptions but the image isn't displayed yet, I had tested the route of the image but nothing seems to work, I'm very confused about that...

18/12/2009
21:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You want to display a image in editing modules or just to display it in the grid with the data from server?

If this is the second case there are a lot of post here + example in the demo.

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.

21/12/2009
17:26
Avatar
edgar9000
Member
Members
Forum Posts: 14
Member Since:
22/08/2009
sp_UserOfflineSmall Offline

Hi,

I want to show an image in the edition form associated with a javascript onclick event

22/12/2009
10:49
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Please set a edittype to image, and be a sure that you have a avalid src set.

Also to bind a click use dataEvents.

For me everthing works ok. The thin momemnt here is the src attribute which should point to a valid image.

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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