:: Forum >>
Is there a work around ?
Hey guys!
thts a real neat one!
and the JIT rendering virtual mode uses is superb.
but I am facing a problem.
Once sorted , Adding rows is giving problems
I think there is a bug in HTTP.Request
but has anyone a solution ?
Tuesday, October 11, 2005
Please provide more information. What are the 'problems'. Show us the HTTPRequest code that you are using. How are you 'adding rows'? Provide some sample code and we can try to help you. Oh, and use your name on your posts so we know who we are helping.
Jim Hunter
Wednesday, October 12, 2005
Hi,
Accept apologies for missing out name.
here is the code while initiating the grid.
var table = new AW.CSV.Table;
table.setURL(path);
table.request();
var columns=["Col1", "Col2","Col3","Col4", "Col5", "Col6"];
var obj = new AW.UI.Grid;
obj.setControlSize(740,670);
obj.setHeaderText(columns);
obj.setColumnCount(6);
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
obj.setSelectorWidth(40);
obj.setSelectionMode("single-row");
obj.setCellModel(table);
document.write(obj);
In the src csv file i keep appending data @ some fixed periodic interval
and then i call a method
function updateTable(){
table.request();
}
It works fine, If you dont sort
But once u sort it. Its messed up.
James
Wednesday, October 12, 2005
James,
Have you tried to also call obj.refresh() after the table.request() in updateTable? And you say "messes up", what exactly is it doing or not doing? Thanks for the code, you do clean work. I like it when code is well commented.
Jim Hunter
Friday, October 14, 2005
Hi Jim,
By messed up i mean
"once u sort the grid , no longer u can add rows in that."
and
i tried obj.refresh() after table.request() but it doesn't make a difference.
James
Monday, October 17, 2005
PS:I am using the 2.0.b relase code and haven't made any changes to source code whatsoever.
James
Monday, October 17, 2005
James, I did not test this (so not really sure), but try with a Timeout.
function updateTable(){
window.setTimeout(function(){
table.request();
},30);
}
}
Carlos
Monday, October 17, 2005
Upppsss , sorry, delete last -- } --
Carlos
Monday, October 17, 2005
Carlos
Monday, October 17, 2005
Did you try this??
function updateTable(){
table.request();
obj.setCellModel(table);
}
Cause I'm not getting errors by add last line, Although up/down arrow-sort-indicator matains last sort (even after the request), so I am wondering there is some kind of conflict here (or I am missing some basic 2.0 functionallity).
Anyway, Alex already post a solution for arrows restoring that can be used:
http://activewidgets.com/javascript.forum.7768.11/using-the-component-for-paged.html
HTH
Carlos
Monday, October 17, 2005
Hi Carlos,
Thanx for da reply.
I hava already tried
function updateTable(){
table.request();
obj.setCellModel(table);
}
and i guess it should not because, it table.request() retrieves data asynchronously.
I have already seen the patch alex suggested on Aug. 16 in
http://activewidgets.com/javascript.forum.1788.28/bug-caused-by-sorting.html
but this patch has to go in Active.HTTP.Request file
so after that how can i again create my "grid.js" for 1.0.1
or "aw.js" for v2.
Any solutions please,
-James
James
Tuesday, October 18, 2005
Hi James,
For ver 1.01 you can simply add the patch-lines at the bottom of grid.js file, but this patch can not be applied to ver 2.0 .
I am still searching for a 2.0 solution .( there is another post about same thing).
Alex, please send us a small comment ........
Thanks
Carlos
Tuesday, October 18, 2005
Hi Alex,
Please show us a way.
James
Wednesday, October 19, 2005
This topic is archived.
Back to support forum
Forum search