Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > datagrid question for the day....

Reply
Thread Tools

datagrid question for the day....

 
 
=?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
Guest
Posts: n/a
 
      10-06-2005
i have a series of datagrids on a webform. it worked fine until i converted
one column to a template. My guess is i'm blanking on something, but that's
the problem with blanking, ...nothing....
ok now i get a "Expression does not produce a value" error when i run the
project.
What's going on? I know i've done this before...

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
Guest
Posts: n/a
 
      10-06-2005
ok, check it out:

this is what studio put in there:
<asp:TemplateColumn HeaderText="trkSite">
<ItemTemplate>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.trkSite") %>'>
</asp:Label>
</ItemTemplate>

but had to change it to this to get it to work:
<asp:TemplateColumn HeaderText="trkSite">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Container.DataItem("trkSite") %>'>
</asp:Label>
</ItemTemplate>

what's the deal?
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


"WebBuilder451" wrote:

> i have a series of datagrids on a webform. it worked fine until i converted
> one column to a template. My guess is i'm blanking on something, but that's
> the problem with blanking, ...nothing....
> ok now i get a "Expression does not produce a value" error when i run the
> project.
> What's going on? I know i've done this before...
>
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes

 
Reply With Quote
 
 
 
 
mpraneetha@gmail.com
Guest
Posts: n/a
 
      10-06-2005
i would do
<asp:Label runat="server" Text='<%#
DataBinder.Eval(Container.DataItem,
"trkSite") %>'>

container.dataitem...

 
Reply With Quote
 
=?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
Guest
Posts: n/a
 
      10-06-2005
thanks for replying and for the code snipit,
my question is why doesn't vs.net convert the item to a template correctly?
thnaks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


"" wrote:

> i would do
> <asp:Label runat="server" Text='<%#
> DataBinder.Eval(Container.DataItem,
> "trkSite") %>'>
>
> container.dataitem...
>
>

 
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
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57