在 asp.net 中运行时设置网格视图的位置
我想在页面加载时在中心显示一个网格 当我单击网格上的选择按钮时,它应该移动到页面右侧...
目前,我正在使用 2 个网格将其显示在中心和右侧...
I want to show a grid in center on pageload
and when I click on select button on grid it should shift to right of page....
Currently, I am using 2 grid's to show it on center and on right...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要从服务器端更改位置:
如果 DIV 或任何其他 HTML 标记中存在网格,则添加 runat="sever" ,然后在按下按钮后访问该 div 的样式属性和样式属性。获取左、右、上或任何其他位置属性,将所需位置分配给该属性&更新该 div 所在的 updatepanel。
To change position from server side:
if grid is present in DIV or any other HTML tag add runat="sever" to that then after button is pressed access the style property of that div & get the Left or Right or Top or any other position-attribute assign the desired position to that attribute & update the updatepanel in which that div is present.
如果 div 中存在网格,则给出 id 和属性 runat=server
然后在选择按钮上给出这个编码......
griddiv.Style.Add("浮动","右");
if grid is present in div give id and property runat=server
then on select button give this coding...
griddiv.Style.Add("float","right");