AspxTreeList 点击刷新问题官网解决方法
2011-01-26 09:14
423 查看
Hi,
I am populating ~1500 nodes in a tree based on a web service call that takes about 10 sec to return (no control over that). I do this on Page_Load.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
LoadTree();
}
//other code to handle when user selects item and other postbacks
}
When i click on node to expand or collapse the entire tree disappears! I have to call LoadTree() on every Page_Load? I cannot deliver a web site that takes 10s to reload page everytime you expand a node in tree (esp. ironic since all the data is there already).
In postback I plan to load supplemental data based on users choice (another time consuming process) - tree disappears then too unless I reload!
Can I get node expand/contract to work exclusively on the client? Ideally I can get notification of node selected and use AJAX update to refresh supplemental data w/o disturbing the treelist.
I see disturbing posts that indicate my 1500 nodes of data are somehow discarded on postback - what is the workaround for that? I don't want to invent workaround for server side storage of data - can I serialize treelist to viewstate or hidden field (something I thought was automatic already) and reload from there if I have to?
Am I missing something? The documentation / samples are pretty sparse and seem to focus on loading a tree from a static XML file or an instant query of a few records from local Access database - not something I ever expect to see in real life.
Rob
Alexey M (DevExpress)
Hi
This behavior is by design. The ASPxTreeList does not persist its nodes in the ViewState. You should create nodes on every page load.
I recommend that you use some caching mechanism. For instance, you can cache data in the Session state on the server, and update it all in every 10 minutes.
I am populating ~1500 nodes in a tree based on a web service call that takes about 10 sec to return (no control over that). I do this on Page_Load.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
LoadTree();
}
//other code to handle when user selects item and other postbacks
}
When i click on node to expand or collapse the entire tree disappears! I have to call LoadTree() on every Page_Load? I cannot deliver a web site that takes 10s to reload page everytime you expand a node in tree (esp. ironic since all the data is there already).
In postback I plan to load supplemental data based on users choice (another time consuming process) - tree disappears then too unless I reload!
Can I get node expand/contract to work exclusively on the client? Ideally I can get notification of node selected and use AJAX update to refresh supplemental data w/o disturbing the treelist.
I see disturbing posts that indicate my 1500 nodes of data are somehow discarded on postback - what is the workaround for that? I don't want to invent workaround for server side storage of data - can I serialize treelist to viewstate or hidden field (something I thought was automatic already) and reload from there if I have to?
Am I missing something? The documentation / samples are pretty sparse and seem to focus on loading a tree from a static XML file or an instant query of a few records from local Access database - not something I ever expect to see in real life.
Rob
Alexey M (DevExpress)
Hi
This behavior is by design. The ASPxTreeList does not persist its nodes in the ViewState. You should create nodes on every page load.
I recommend that you use some caching mechanism. For instance, you can cache data in the Session state on the server, and update it all in every 10 minutes.
相关文章推荐
- 如何点击验证码刷新验证码的问题解决方法?
- DevExpress TreeList 常见问题解决方法
- javaweb用户注销后点击浏览器返回刷新页面重复登录问题的解决方法
- 如何点击验证码刷新验证码的问题解决方法?
- 解决iOS开发 百度地图点击协议方法不走的问题
- 解决微信内置浏览器返回上一页强制刷新问题方法
- Java中泛型集合List<T>反序列化问题及解决方法
- Recyclerview或Listview实时刷新,item点击事件失效的解决方法
- IE7和IE8下验证码自动刷新失败的问题及解决方法
- JavaScript页面刷新与弹出窗口问题解决方法
- ImportError: No module named etree.ElementTree问题解决方法
- Javascript刷新页面的几种方法(页面刷新与弹出窗口问题解决方法)
- C#.net picturebox动画效果,刷新图像的闪烁问题解决方法
- DataGridView绑定List<T>数据源时,点击DataGridView列头自动排序解决方法
- 解决Ext JS 4.1版本Tree在刷新时选择第一行的问题
- 完美解决listView 文字超链接点击事件和listitem点击事件冲突问题
- 解决Button多次点击重复执行方法的问题
- 《解决微信内置浏览器返回上一页强制刷新问题方法》
- 关于delphi中控件刷新时带来的闪烁问题(gif),转自别人的解决方法描述。
- JavaScript页面刷新与弹出窗口问题解决方法