Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > DataGrid - DataBinder.Eval

Reply
Thread Tools

DataGrid - DataBinder.Eval

 
 
Ganesh
Guest
Posts: n/a
 
      11-13-2003
I am using a Datagrid and am populating the column header
which is being picked up from a database.
My problem is that if the column name conatins a "."
within the name then it throws an error as follows

DataBinder.Eval: 'System.Data.DataRowView' does not
contain a property with the name The Tools Mfg.
Error Stack :at
System.Web.UI.DataBinder.GetPropertyValue(Object
container, String propName)

Any help on this issue will be appreciated.
PLease if anyone reading this help asap as I'm stuck with
the same.

Regards,
Ganesh Mahadevan
((E-Mail Removed))
 
Reply With Quote
 
 
 
 
Mike Moore [MSFT]
Guest
Posts: n/a
 
      11-13-2003
Hi Ganesh,

I created a column named a.a and I put some data in it b.b

Then I setup a datagrid with this binding:
<%# DataBinder.Eval(Container, "DataItem.a.a") %>
It failed as you described.

Then I got it to work by changing the binding function to this
<%# Container.DataItem("a.a") %>

I hope this helps.

Thank you, Mike
Microsoft, ASP.NET Support Professional

Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computerís security.

This posting is provided "AS IS", with no warranties, and confers no rights.


--------------------
> From: http://www.velocityreviews.com/forums/(E-Mail Removed) (Ganesh)
> Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridc ontrol
> Subject: DataGrid - DataBinder.Eval
> Date: 12 Nov 2003 23:00:00 -0800
> Organization: http://groups.google.com
> Lines: 18
> Message-ID: <(E-Mail Removed) >
> NNTP-Posting-Host: 203.199.91.66
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 8bit
> X-Trace: posting.google.com 1068706800 10604 127.0.0.1 (13 Nov 2003

07:00:00 GMT)
> X-Complaints-To: (E-Mail Removed)
> NNTP-Posting-Date: Thu, 13 Nov 2003 07:00:00 +0000 (UTC)
> Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnew s1.google.com!no
t-for-mail
> Xref: cpmsftngxa06.phx.gbl

microsoft.public.dotnet.framework.aspnet.datagridc ontrol:7427
> X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridc ontrol
>
> I am using a Datagrid and am populating the column header
> which is being picked up from a database.
> My problem is that if the column name conatins a "."
> within the name then it throws an error as follows
>
> DataBinder.Eval: 'System.Data.DataRowView' does not
> contain a property with the name The Tools Mfg.
> Error Stack :at
> System.Web.UI.DataBinder.GetPropertyValue(Object
> container, String propName)
>
> Any help on this issue will be appreciated.
> PLease if anyone reading this help asap as I'm stuck with
> the same.
>
> Regards,
> Ganesh Mahadevan
> ((E-Mail Removed))
>


 
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
Re: Datagrid: how cut short display of a long description in a datagrid column Brian K. Williams ASP .Net 0 03-02-2004 08:35 PM
RE: Datagrid: how cut short display of a long description in a datagrid column =?Utf-8?B?U3VyZXNo?= ASP .Net 0 03-02-2004 08:31 PM
datagrid in datagrid BK Kim ASP .Net 1 03-02-2004 06:34 AM
Call Datagrid Command column outside datagrid Dave ASP .Net 0 11-20-2003 11:11 AM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments