如何动态调整Devexpress网格宽度?
我有一个包含 3 个 td 的表格,第一个 td 宽度为 1%,其中有一个图像按钮控件(固定图像)。第二个包含 98% 和 DevExpress GridView,第三个也是 1% 宽度和一个图像按钮控件。
当用户单击 Pin 图像时,我确实将网格的 Td 宽度更改为 79%,但网格的宽度不会相应地调整大小 直到我重新调整网格中任何列的大小。
手动调整列大小后,网格将调整为 TD 的宽度。
我不想手动执行该操作,而应在单击其他 TD 中的图像按钮控件时以编程方式完成。
I have a table with 3 tds, 1st td with 1% width and a image button control(Pin image) in it. 2nd with 98% and DevExpress GridView in it and the 3rd is also 1% width and a image button control.
When the user clicks on the Pin image, I do change Grid's Td width to 79% but the Grid's width do not resize accordingly
until I re-size any column in the grid.After manually resizing a column the grid is adjusted to the TD's width.
I do not want to manually do that action instead it should be done programmatically while I click image button control which is in other TD.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更改 Td 宽度后尝试调用 ASPxClientGridView.AdjustControls 。
Try calling ASPxClientGridView.AdjustControls after changing Td width.
根据 td 宽度设置客户端网格的宽度,并通过使用
Datarowtemplate
使用 %age 中的列宽度。检查这些链接..可能会帮助你..
http://www.devexpress.com /Support/Center/p/B142928.aspx
http://www.devexpress.com/Support/Center/e/E2381.aspx
http://www.devexpress.com/Support/Center/p/Q130353.aspx
Set the width of the grid at client side as per the td width and use the columns width in %age by using the
Datarowtemplate
.check these links.. may help you ..
http://www.devexpress.com/Support/Center/p/B142928.aspx
http://www.devexpress.com/Support/Center/e/E2381.aspx
http://www.devexpress.com/Support/Center/p/Q130353.aspx