如何动态调整Devexpress网格宽度?

发布于 2024-12-23 10:00:23 字数 314 浏览 7 评论 0原文

  1. 我有一个包含 3 个 td 的表格,第一个 td 宽度为 1%,其中有一个图像按钮控件(固定图像)。第二个包含 98% 和 DevExpress GridView,第三个也是 1% 宽度和一个图像按钮控件。

  2. 当用户单击 Pin 图像时,我确实将网格的 Td 宽度更改为 79%,但网格的宽度不会相应地调整大小 直到我重新调整网格中任何列的大小。

  3. 手动调整列大小后,网格将调整为 TD 的宽度。

  4. 我不想手动执行该操作,而应在单击其他 TD 中的图像按钮控件时以编程方式完成。

  1. 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.

  2. 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.

  3. After manually resizing a column the grid is adjusted to the TD's width.

  4. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泅人 2024-12-30 10:00:23

更改 Td 宽度后尝试调用 ASPxClientGridView.AdjustControls

Try calling ASPxClientGridView.AdjustControls after changing Td width.

南烟 2024-12-30 10:00:23

根据 td 宽度设置客户端网格的宽度,并通过使用 Datarowtemplate 使用 %age 中的列宽度。

myGrid.SetWidth(e.pane.GetClientWidth());

检查这些链接..可能会帮助你..

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.

myGrid.SetWidth(e.pane.GetClientWidth());

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文