Silverlight 4 中的 DataGrid 和 GridSplitter

发布于 2024-09-07 21:43:28 字数 368 浏览 2 评论 0原文

我有一个网格,其中有两行用 gridsplitter 分割。 在第一行中,我显示带有数据分页器的数据网格,其垂直对齐方式设置为拉伸。 在第二行中,我将 DataForm 显示为 Expander 控件中的子项。

我想要的是当没有 Expander(DataForm 可见性)时,DataGrid 占据所有空间(垂直),但很快用户按下 Expander 查看 DataForm,它向上打开,DataGrid 缩小,以便可以显示 DataForm 。

目前,当我单击扩展器时,它会展开并显示数据表单,但数据网格大小不会改变。即使我也无法使用 GridSplitter 将其缩小。它只达到页面大小。

任何想法有什么问题吗?或者是因为我无法减少数据分页器想要显示的具体行数(15)。

I have a grid with tow rows splitting with the gridsplitter.
In first row I'm showing the datagrid with datapager and its Vertical Alignment is set to stretch.
In the second row I'm displaying the DataForm as Child in the Expander Control.

What I want is to occupy all space(vertically) by DataGrid when there is No Expander (DataForm Visibility) but Soon the User press the Expander to view the DataForm, it open's upward and the DataGrid to be shrinked so that the DataForm can be displayed.

At present when I click on the Expander, it does expand and show the dataForm but the datagrid size does not changed. Even I cannot make it smaller with the GridSplitter. It only goes upto the pagesize.

Any ideas what's wrong? OR is it because I cannot reduce as the datapager wants to display the specific number of rowns (15).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

已下线请稍等 2024-09-14 21:43:28

这看起来与你的其他问题重叠

...同样的答案可能也适用于这个。基本上,您必须限制容器/控件的整体大小,使用扩展器上的自动调整大小的行和网格的星形大小的行。

根据另一个问题,我不明白为什么你首先会在该配置中使用网格分离器。

This looks like it overlaps your other question...

The same answer will likely apply to this one. Basically you have to constrain the overall size of your container/control, using An Auto-Sized row on the Expander and a Star-size row for the Grid.

as per the other question, I do not see why you would have a grid splitter in that configuration in the first place.

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