I have a scenario like to display the records coming from a database query in 5columns in a row using Ext-Js (NOT by using GRID's)
For example: if the query returns 10 records to we need to have 2 rows with 5columns in each row.
The following is the code which displays the records in only one column (one below another)
for( var c=0;c<audits.length;c++){
var analyst_audit_qa = audits[c].split(":");
var cont = maincont.items.items[1];
var qaPercentage = "0.00";
if ((Ext.util.Format.number(analyst_audit_qa[1], '0,000') != 0) && (Ext.util.Format.number(analyst_audit_qa[2], '0,000') != 0))
qaPercentage = 100 * Ext.util.Format.number(analyst_audit_qa[2], '0,000') / Ext.util.Format.number(analyst_audit_qa[1], '0,000');
if (qaPercentage != "0.00") qaPercentage = qaPercentage.toFixed(2);
var analyst_total_reviewed;
analyst_total_reviewed = Ext.util.Format.number(analyst_audit_qa[1], '0,000');
var analyst_qa_changes;
if (analyst_audit_qa[2] != 0){
analyst_qa_changes = String.format('{1}', Ext.util.Format.number(analyst_audit_qa[2], '0,000'));
}else{
analyst_qa_changes = Ext.util.Format.number(analyst_audit_qa[2], '0,000');
}
cont.insert(c, {
xtype: 'displayfield',
fieldLabel: "<b>"+analyst_audit_qa[0]+"</b><br />"+"QA Percentage: "+"<br />"+"Total Reviewed: "+"<br />"+"Changes made",
id: 'analyst_audit_qa'+c,
value: "<br />"+qaPercentage+"%<br />"+analyst_total_reviewed+"<br />"+analyst_qa_changes
});
}
maincont.doLayout();
Can you please help me on this? Please let me know if you need anything more.