Forum


17:29

22/08/2009

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'
});
18:08

Moderators
30/10/2007

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.
21:01

Moderators
30/10/2007

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.
10:49

Moderators
30/10/2007

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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66