:: Forum >>
Alex.. May be this is bug in grid
Hi Alex,
I have a requirment of hidding rows and columns. For hidding columns i am using function
obj.setColumnIndices([1,3,4]);
It is working fine. but when i used the function
obj.setRowIndices([0,2,3,4]);
to hide rows, it is actually hidding rows, but at that hidden rows position it is displaying white space. Is it a bug.. or i am dooing wrong.
Panasa
Friday, October 12, 2007
Sorry, I cannot reproduce this. Can you give me an example?
Alex (ActiveWidgets)
Friday, October 12, 2007
Hi Alex,
I am just sending the example below...look at it. it think u will get the pectore of my problem..
1st Row 11 21 25 28 29
2nd Row 24 26 42 95 45
3rd Row 11 21 25 28 29
4th Row 24 26 42 95 45
5th Row 11 21 25 28 29
6th Row 65 45 43 23 25
That was my grid. When i apply obj.setColumnIndices([1,3,4]);. It is looking like this
1st Row 21 28 29
2nd Row 26 95 45
3rd Row 21 28 29
4th Row 26 95 45
5th Row 21 28 29
6th Row 45 23 25
With column hiding i have no problem. But when i use it for row hiding
obj.setRowIndices([0,2,3,4]);. My grid looks like this
1st Row 11 21 25 28 29
2nd Row
3rd Row 11 21 25 28 29
4th Row 24 26 42 95 45
5th Row 11 21 25 28 29
6th Row
This is problem i am getting. Actually it is not hiding rows there. It is not displaying cell values. If i am dooing any thing wrong. Please tell me.
Thanks Alex for your support
Panasa
Tuesday, October 16, 2007
Hi panasa,
I had the same requirement i have done like below and it just works fine to me
showindices is array of rows which i want to display
//suf: added to hide rows
JSGrid.prototype.showRows = function(showindices)
{
this.obj.setRowCount(showindices.length);
this.obj.setRowIndices(showindices);
this.obj.refresh();
}
//calling function
var rowIndices = [];
var showindices = new Array();
function handleRowsDisplay(recordSize, grid, dataGrid)
{
for (var i=0; i<recordSize; i++){
rowIndices.push(i);
}
var value = grid.getSelectedRows();
var k = 0;
for (var z=0;z<recordSize;z++ )
{
if (dataGrid[z]["display"] == "true")
{
showindices[k] = [z];
k++;
}
}
grid.showRows(showindices)
}
Sufiya khan
Wednesday, October 17, 2007
This topic is archived.
Back to support forum
Forum search