:: Forum >>

Grid Updation problem

Hi All,
I am a newbie to this component and whole JS thing.
I am using a grid in a page and data source is a "txt" file.
// create ActiveWidgets data model - text-based table
    var table = new Active.Text.Table;

    // provide data URL - plain text comma-separated file
    table.setURL(path);

    // start asyncronous data retrieval
    table.request();

    // define column labels
    var columns=["TIME", "NODE","GRADE","CNTL_MODE", "CPU LOAD", "MEMORY"];
var obj = new Active.Controls.Grid;

    // provide column labels
    obj.setColumnProperty("texts", columns);

    // provide external model as a grid data source
    obj.setDataModel(table);
// write grid html to the page
    document.write(obj);

Everything works fine, now from server-side i make some changes in the txt file and so to update grid i am calling
table.request();
It also works fine, but if the size of txt file get larger, it doesnt reload,
and it doesnt show any error msg also.

Any help will be appreciated.
Vipin
Vipin
Wednesday, October 5, 2005
Hi,
After some further investigation, I found that its not a problem with size of src file.
but the grid is being updated unless i do a sorting operation.
so it has to do something with sorting operation.

Is it a bug already reported ?

Vipin
Vipin
Wednesday, October 5, 2005
table.request() only gets called when you initially load the data into the grid from the txt file.

the grid is made up of two parts, the GUI (interface) and data (can also be referred to as dataset)

After doing another table.request(), I suspect you might need to do a obj.refresh

It might do a obj.refresh on table.request() (after the data is retrieved) but I'm not sure.
Kosie
Wednesday, October 5, 2005
I think it is doing
because unless I sort any column, grid gets updated pretty smoothly.

Its a problem only when it tries to update after sorting.
Its same bug as discussed in
http://www.activewidgets.com/javascript.forum.1788.24/bug-caused-by-sorting.html
and there is a solution suggested there, but I dont know where to add that.

Is there any place where i can see more examples,

All I want is A grid which is using paging , data src is a txt file and a way to update it (even after sorting a column).

Can someone provide me an example please!

Vipin
Vipin
Wednesday, October 5, 2005
Anyone listening please!
Vipin
Wednesday, October 5, 2005

This topic is archived.


Back to support forum

Forum search