:: Forum >> Version 2 >>

Problem in displaying images

Hi,

I have load the xml file in the data grid. I want to add 2 more columns for edit & delete.
I have added the code to display the images but somehow it is not displaying.
I have attached the code.
please look at the code and rectify the mistake I have done.

<body>
<
div id="1" style="width:930px;height:200px;overflow:auto">

<
script>

    var 
table = new AW.XML.Table;
    
table.setURL("companies-simple.xml");
    
table.request();

    var 
obj = new AW.Grid.Extended;
    var 
str = new AW.Formats.String;
    var 
num = new AW.Formats.Number;

    
obj.setCellModel(table);
    
obj.setRowCount(20);
    
obj.setColumnCount(7);
    

    
obj.setCellFormat([strstrnumnumnum]);

    
//    provide cells and headers text
    //obj.setCellText(myData);
    
obj.setHeaderText(myColumns);

    
//    set number of rows/columns

    //    enable row selectors
    
obj.setSelectorVisible(true);
    
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});

    
//    set headers width/height
    
obj.setSelectorWidth(28);
    
obj.setHeaderHeight(20);

    
obj.setCellEditable(false);

    
obj.setFixedLeft(1);
    
obj.setVirtualMode(false);

    
obj.setSelectionMode("single-row");
    
obj.setCellLink(function(ij){ return "http://www.mysite.com?i="+i+"&j="+j; }, 5);    // set data  
    
obj.setCellTemplate(new AW.Templates.Link5);    // and template  
    
obj.setCellLink(function(ij){ return "http://www.mysite.com?i="+i+"&j="+j; }, 6);    // set data  
    
obj.setCellTemplate(new AW.Templates.Link6);    // and template  
    
for (var i=0i<obj.getRowCount(); i++)
    {
        
obj.setCellText("<img src='editicon.gif' BORDER='0'>"5i);
        
obj.setCellTooltip("Edit",5,i);  
        
obj.setCellText("<img src='delicon.gif' BORDER='0'>"6i);  
        
obj.setCellTooltip("Delete",6,i);  
    }

    
document.write(obj);
    
obj.setSelectedRows([5]);     
    
obj.setCurrentRow(5-4); 
</
script>
</
body>
 
SS
Tuesday, April 25, 2006
its Urgent!!! Please reply
SS
Tuesday, April 25, 2006
Please look at this page describing how to define image classes in CSS -

http://www.activewidgets.com/grid.howto.cells/images.html
Alex (ActiveWidgets)
Tuesday, April 25, 2006



This topic is archived.

Back to support forum

Forum search