|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Urgent! GridView and templated controls binding---------Plz helpMy GridView has templated controls in it and I'm binding to an ObjectDataSource. The problem is it refused to bind to my grid column "ColumnName" which is also an UpdateCommand Parameter for the ObjectDataSource. It displays the following error "DataBinding: 'System.String' does not contain a property with the name 'ColumnName'. I've also cheched it with FormView and that is not binding either. same error. <ItemTemplate> <asp:Label ID="Label5" runat="server" Text='<%# Eval("ColumnName") %>'></asp:Label> </ItemTemplate> Plz help, Shafia > ObjectDataSource. It displays the following error Sounds like what you're databinding to is a String.> "DataBinding: 'System.String' does not contain a property with the > name 'ColumnName'. -Brock DevelopMentor http://staff.develop.com/ballen Yes I'm binding to a string type "UpdateCommandParameter" of
"ObjectDataSource". Please tell me what am I doing wrong <ItemTemplate> <asp:Label ID="Label5" runat="server" Text='<%# Eval("ColumnName") %>'></asp:Label> </ItemTemplate> Even the following doesnt work <ItemTemplate> <asp:Label ID="Label6" runat="server" Text = '<%# DataBinder.Eval(Label6.DataItem, "ColumnName") %>' OnDataBinding="Label6_DataBinding"></asp:Label> </ItemTemplate> Thanks, Shafia Show quoteHide quote "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message news:448013632489843756231440@msnews.microsoft.com... > > ObjectDataSource. It displays the following error > > "DataBinding: 'System.String' does not contain a property with the > > name 'ColumnName'. > > Sounds like what you're databinding to is a String. > > -Brock > DevelopMentor > http://staff.develop.com/ballen > > >
Customizing ASP.NEt Hyperlink Control
IE Web Controls - discontinued ??? custom validator and button events custom validator and button events Re: At which life cycle should EnsureChildControls() be called? Control Template How do I post hidden variables to another form from a popup? Sorting problem in Data grid control dataset values in a dropdownlist Stop datagrid causing validation |
|||||||||||||||||||||||