烦人的GridView/ObjectDataSource问题 [英] Annoying GridView/ObjectDataSource Problem
问题描述
我正在研究一个Web项目,我决定以n层方式进行开发.
尽管该项目主要基于GridViews,但我使用ObjectDataSources,该对象与我的自定义管理器链接,并将那些数据源链接到我的网格视图.到目前为止,一切都还不错:
当我使用对象数据源之一设置网格视图的数据源时,不再填充列.
原谅我的英语不够,所以让我用一个例子来解释:
我有带有类型为x,y,z的A,B,C列的表.通常,当我将对象数据源绑定到网格视图时,将更新该视图,并获得具有A类型x,B类型y,C类型z等的列网格视图.这是Visual Studio工作的方式设计时间.
到现在为止都是这种情况,现在我只得到Unbounded Col1,Unbounded Col等.
我已经尝试了一切,谷歌搜索,重新启动等,但是什么都没有改变.
最好的问候.
I am working on a web project which I decided to develop in an n-tier fashion.
While the project is heavily based on GridViews I use ObjectDataSources which I link with my custom managers and link those data sources to my grid views. Evertyhing was OK until now:
When I set the data source of a grid view with one of my object data source the columns are not populated anymore.
Forgive my inadequate English, so let me explain with an example:
I have table with columns A, B, C with types x, y, z. Normally, when I bind my object data source to my grid view, the view is updated and I get a column grid view with A of type x, B of type y, C of type z etc. This is the way visual studio works on design time.
Until now this was the case bu now I only get Unbounded Col1, Unbounded Col etc.
I have tried everything, googled, restart etc. but nothing changed.
Best regards.
推荐答案
因此出现列,但数据不出现?您是否检查过诸如自动分配列之类的属性?您是否尝试过为网格手动分配模板?
So the columns appear, but the data does not ? Have you checked properties like the auto assign columns ? Have you tried manually assigning a template for your grid ?
感谢您的答复.
是的,我已经检查了所有属性.我也有工作的网格和源,我正在进行项目的一半.
因此,我还尝试使用已经工作的数据源添加新的网格视图,但是再次失败.
也许我忘记了打开bracet或类似的内容在我的页面之一html编码中.这样的事情会引起这样的问题吗?
顺便说一句,应用程序正常运行.
Thanks for your reply.
Yes I have checked all properties. I also have working grids and sources, I am halfway on my project.
So I also tried to add a new grid view with an already working data source but again it fails.
Maybe I have forgotten an open bracet or something like that in one of my pages'' html coding. Will something like that cause such a problem?
By the way the application is working with no errors.
检查自动生成"列是否设置为true.
Check if Autogenerate columns is set to true.
这篇关于烦人的GridView/ObjectDataSource问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!