on 05-07-2007 3:31 PM
Hi,
Is it possible to change the colors of alternate lines in the Grid display time for better readability.
Thanks,
Mahwish
Actually, one of our customers requested this functionality.
I created a JS utility function for iGrids that gets called on Update Events. I don't recommend doing this as there is a bit of over head for only cosmetic gains. But, here it is:
/*=========================================================
// NAME: formatGrid(objApplet)
// AUTH: Ryan Miller at Infodatinc dot com
// DATE: 2007.03.20
// DESC: Alternates row color of the referenced iGrid object
//===========================================================
// Revision History:
// #2007.03.20:rm - initial version
//=========================================================*/
function formatGrid(myApplet) {
var myGrid = myApplet.getGridObject();
var rowCount = myGrid.getRowCount();
var colCount = myGrid.getColumnCount();
for (var i=2; i<=rowCount; i=i+2) {
for (var j=1; j<=colCount;j++) {
myGrid.setCellBackgroundColor(i,j,myApplet.createColor("230,230,230"))
}
}
myApplet.updateGrid(false);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mahwish,
This is not currently an option built into the xMII Grids. A workaround would be to add another column to your dataset with either a 0 or 1 and then use the color contexting tab to match only the 0's to a certain color. You can then hide this column in the Grid template and this will give you the effect you want.
Erik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.