DataGrid 中的扩展器 (Silverlight)
我有一个 DataGrid,我需要动态添加一个 Expander 控件以根据某些条件对几行进行分组...任何人都可以帮助我吗...我对 Silverlight 完全陌生:(
I have a DataGrid and I need to add an Expander control dynamically to group few rows based on some conditions... Can anyone help me in this... I am completely new to Silverlight :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
找到答案,我为扩展器创建了一个单独的列,并在满足我的条件时设法显示它。虽然它不是动态的,但解决了目的。 :)
Found the answer, I have created a separate column for the expander and managed to display it when my condition is satisfied. It is not dynamic though, but solved the purpose. :)
动态——不确定你想要什么。我已经静态地完成了扩展器。我的两点建议:保持简单,不要尝试做太多事情。如果您动态地获取主/详细信息数据网格视图,则可以通过 XAML 并使用 ObservableCollection 类加载网格视图来完成(搜索网络)。还要搜索控件的 PagedCollectionView 和 .Visibility 属性。如果要动态地将控件添加到 StackPanel,请在网上搜索 .Children.Remove 方法。
祝你好运,但作为一个初学者,我认为你可能尝试做太多事情。
Dynamically--not sure what you want. I've done expanders statically. My two cents: keep it simple and don't try and do too much. If by dynamically you are taking about Master/Details data gridview, that can be done by XAML and loading the gridview with an ObservableCollection class (search the net). Also search for PagedCollectionView and .Visibility properties for controls. If you want to add controls to a StackPanel, dynamically, search the net for .Children.Remove methods.
Good luck, but as a beginner you are probably trying to do too much IMO.