Silverlight 4 中的 DataGrid 和 GridSplitter
我有一个网格,其中有两行用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来与你的其他问题重叠
...同样的答案可能也适用于这个。基本上,您必须限制容器/控件的整体大小,使用扩展器上的自动调整大小的行和网格的星形大小的行。
根据另一个问题,我不明白为什么你首先会在该配置中使用网格分离器。
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.