如何保持展开的子网格视图在回发时可见 [英] How do I keep the expanded child grid views visible on postback
本文介绍了如何保持展开的子网格视图在回发时可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有可折叠可编辑嵌套gridview的表单.当我尝试在子视图中编辑项目时,发生回发,这会使所有子GridView折叠.我查看了网络上的其他帖子,但无法弄清楚如何记住"哪些子视图已展开,并在回发后再次打开它们.
I have a form with a collapsable editable nested gridview. When I try to edit the items in the child view a postback occurs which collapses all the child gridviews. I looked at some other posts on the web, but couldn''t figure out how to get it "remember" which child views were expanded and open them again after a postback.
推荐答案
您好,
展开和折叠面板只是客户端(javascript)动作.
希望您知道asp.net不会维护JavaScript操作.
但是
如果使用Jquery,则可以实现.
您必须将该动作发布到服务器上并在会话中维护该数据.
然后在页面加载中检查会话数据,将样式和属性设置为面板
希望您能理解我的意思
最好的
Hi,
expanding and collapse panels is only client side(javascript) actions .
I hope you know that asp.net don''t maintain javascript actions.
But
If you use Jquery it can achieve .
on every action you''ve to post that action to server and maintain that data in session.
And then in pageload check that session data , set styles and properties to panels
I hope you understood what I said
All the Best
这篇关于如何保持展开的子网格视图在回发时可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文