Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rana Hossain on Aug 20, 2008 09:08
open dhtmlx forum
Refresh Grid Question

Hi; I am using Professional version of TreeGrid, and I am trying to solve the following problem.

I have a grid with dyn. server side xml loading data with ss-sorting, and paging output. Now, I would like to refresh current page from another javascript function.

updateFromXML, loadXML methods are rather messy to use in my case; to keep the user on the correct page, I would need to pass current sorting order (if any), current search condition (if any), and ofcourse the page number. But then again, as the grid uses "posStart" and "count" to get to a record, it makes sense to reload using these values instead of page number (and count)

So what are my options? the document mentions "Please check samples/pro_form.html (Professional Edition only) " but that html file isn't included.

Thanks in advance.

Rana Hossain
Answer posted by Support on Aug 20, 2008 09:40

>> it makes sense to reload using these values instead of page number (and count)
Can be done as 
data = grid.getStateOfView();
for (var i = data[1]; i<data[2]; i++) //for rows on current page
   grid.rowsBuffer[i]=null; //delete rows in buffere
grid.changePage();//force page rendering update

As result , code will clear row's info for current page, and component will use default way to request data from server for such part of code
If you need to reset all rows in grid - just nulify all values in rowsBuffer collection. 

>> the document mentions
It seems as outdated reference, where did you find it?

Answer posted by Rana Hossain on Aug 20, 2008 09:56
>> the document mentions
>> It seems as outdated reference, where did you find it?

we purchased the component on the 13th aug and got a link to download dhtmlxTreeGrid_pro_v16_80512.zip; reference was included in the downloaded zip. Is there a newer version or documentation?

Thanks for your quick reply; will test it out shortly.

Rana

Answer posted by Support on Aug 21, 2008 01:39
>>Is there a newer version or documentation?
You are using latest version of documentation, it was our error , to miss and not remove outdated reference. Sorry for inconvenience.