datagrid question for the day....

Discussion in 'ASP .Net' started by =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=, Oct 6, 2005.

  1. 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
     
    =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=, Oct 6, 2005
    #1
    1. Advertising

  2. 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
     
    =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=, Oct 6, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=

    Guest

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

    container.dataitem...
     
    , Oct 6, 2005
    #3
  4. 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...
    >
    >
     
    =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=, Oct 6, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    2
    Views:
    432
    Alan Lambert
    Nov 4, 2004
  2. =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=

    calander question about getting the day of the seected date

    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=, May 31, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,011
    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=
    Jun 2, 2005
  3. Andy
    Replies:
    1
    Views:
    736
  4. Replies:
    2
    Views:
    280
  5. Rob Redmon

    Convert day of year to month, day

    Rob Redmon, Apr 4, 2008, in forum: Ruby
    Replies:
    7
    Views:
    314
    Alex Wayne
    Apr 4, 2008
Loading...

Share This Page