Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Urgent! GridView and templated controls binding---------Plz help

Reply
Thread Tools

Urgent! GridView and templated controls binding---------Plz help

 
 
Shafia
Guest
Posts: n/a
 
      04-13-2005
Hi,

My 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



 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      04-13-2005
> 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



 
Reply With Quote
 
 
 
 
Shafia
Guest
Posts: n/a
 
      04-13-2005

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



"Brock Allen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ...
> > 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
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Templated User Controls - Limit child controls allowable within a templated control JohnyStyles@gmail.com ASP .Net 0 05-29-2006 06:00 PM
Urgent! GridView and templated controls binding. Plz help Shafia ASP .Net Building Controls 3 04-14-2005 05:33 PM
Urgent! GridView and Templated controls binding. Plz help Shafia ASP .Net 2 04-14-2005 12:50 PM
Subtypes of templated types (in templated functions) Marijn C++ 5 02-13-2004 09:50 AM
implementing a templated struct within a templated struct RA Scheltema C++ 3 01-06-2004 11:25 AM



Advertisments