Alex
I must be missing something . . . sorry.
setRowIndices seems to perform a completely different function to the deprecated
setRowValues. Try out the code below and you will see no rows are displayed (because rows 111,222,333,444 and 555 don't exist!).
var myData = [
["MSFT","Microsoft Corporation", "314,571.156", "32,187.000", "55000"],
["ORCL", "Oracle Corporation", "62,615.266", "9,519.000", "40650"],
["SAP", "SAP AG (ADR)", "40,986.328", "8,296.420", "28961"],
["CA", "Computer Associates Inter", "15,606.335", "3,164.000", "16000"],
["ERTS", "Electronic Arts Inc.", "14,490.895", "2,503.727", "4000"]
];
var obj = new AW.UI.Grid;
obj.setColumnCount(5);
obj.setRowCount(5);
obj.setRowIndices( ["111", "222", "333", "444", "555"] );
obj.setCellText(myData);
document.write(obj);
As you say in the grid.htm example, the setRowIndices() method is used to re-arrange or hide rows, not set the RowIDs.
obj.setRowIndices([0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]);
document.write(obj);([19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0]);
This is a VERY desirable function to have, I agree, but if I could associate the RowIDs with the data IDs in my SQL database (which is what I am
trying to do) then
filtering the data in the grid 'on the fly' will be so easy - I simply assemble a list of data IDs using a SQL SELECT statement and pass it to the grid using setRowIndices() and
voila! - I have filtered my list.
Is this a good way of doing it and if so, what method do I use to set the RowIDs because, as I have indicated, setRowIndices() doesn't seem to work the way you describe. Please advise.