PDA

View Full Version : ExtJS image gallery in gridpanel



benzo11
26 Mar 2014, 1:33 AM
I am struggling how to show multiple columns in gridpanel. Currently I have single column, where I show all images which are stored. The question is, how I can display for example 3 images in same row(decepted ofcourse)?
On the image is show more specificly how should be.. There is picture how should be look like, and a code definition for columns.
I would apreciate for any help provided!

http://oi62.tinypic.com/2eovfhe.jpg



(http://oi62.tinypic.com/2eovfhe.jpg)

{id: 'id', header: '#ID', dataIndex: 'id', hidden: true},
{dataIndex: 'imgPath_server', hidden: true },
{header: 'PictureName', dataIndex: 'fileName',width:10},
{header: 'Image', dataIndex: 'fileLocation', renderer: function(a,b){
var data = Ext.getCmp('<?php echo $treePanel;?>').selModel.selNode.attributes;
return "<img src='upload/slika_"+data.id+"/"+a+"' atl='"+a+"' style='width:100px; height:100px;'>";

(http://oi62.tinypic.com/2eovfhe.jpg)
(http://oi62.tinypic.com/2eovfhe.jpg)

benzo11
29 Mar 2014, 2:34 AM
Any idea how to apply style in gridpanel?

willigogs
30 Mar 2014, 5:52 AM
I would not use a gridpanel for this (unless you have some unexplained reason to do so?).

Use a dataview instead.

benzo11
1 Apr 2014, 10:25 PM
I would not use a gridpanel for this (unless you have some unexplained reason to do so?).

Use a dataview instead.

thanks for your reply. Suddenly I have decided to fill columns with data of the image. I would have many work with reprogramming becouse the project is beeing huge.

Greetings!
close request