Telerik Silverlight GridView ItemSource 错误
所以我得到了我正在开发的这个应用程序,它有一个 Telerik Silverlight gridview。我从 Web 服务获取动态 XMl,创建一个动态对象(这是 SL 3 FYI,因此没有 system.Dynamic 或 Expandos),然后构建对象列表并将其作为 System.Collections.IEnumerable 返回。从那里我将 gridView ItemsSource 设置为我刚刚获得的上述列表。我遇到的问题是,在此列表中,它正确地包含所有列、单元格和标题,以及所有正确的信息,但在 gridview 上,任何包含 / 字符的列,单元格数据都不会显示。任何人都知道为什么会发生这种情况以及我该如何解决它?
So Ive got this application that Im working on that has a Telerik Silverlight gridview. I get dynamic XMl from a web service, create a dynamic object(this is SL 3 FYI, so no system.Dynamic or Expandos) and then build a list of the objects and return it as a System.Collections.IEnumerable. From there I set the gridView ItemsSource to the aforementioned list I just got. The problem Im having is that in this list, it has all of the columns, cells, and headers correctly, with all of the correct information, but on the gridview, any columns that contain a / character, the cell data does not get displayed. Anyone know why this might be happening and how I can get around it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,我无法重现您的问题。
根据我对您问题的理解,正确的数据正在通过 Web 服务进入您的 Silverlight 应用程序,但 RadGridView 正在破坏包含
/
字符的任何数据。如果是这种情况,那么类似以下内容应该会重现该问题:XAML(在 MainWindow.xaml 中)
C#(MainWindow.xaml.cs 中的构造函数):
但是,这对我来说行为正确(SL4、Telerik DLL 版本 2011.3。 1116.1040)。
如果没有看到您的代码,我们只能真正猜测您问题的可能答案。如果 Telerik RadGridView 确实正在破坏您的数据,您至少可以向我们展示代码的相关部分吗?或者更好的是,将 放在一起SSCCE 表明了这个问题?
Sorry, I couldn't reproduce your problem.
From what I understand of your question, the correct data is making its way into your Silverlight application via the web service, but the RadGridView is mangling any of your data that contains a
/
character. If this is the case, then something like the following ought to reproduce the problem:XAML (in MainWindow.xaml)
C# (constructor in MainWindow.xaml.cs):
However, this behaves correctly for me (SL4, Telerik DLLs version 2011.3.1116.1040).
Without seeing your code we can only really guess at possible answers to your question. If the Telerik RadGridView really is mangling your data, could you at least show us the relevant parts of your code, or better yet, put together an SSCCE that demonstrates the issue?