datagrid errors

Discussion in 'ASP .Net' started by Kevin, Feb 26, 2004.

  1. Kevin

    Kevin Guest

    What is the correct way to check for this inside a grid?

    <% If Container.DataItem("from_fly_from") <> "" then %>

    I want to only display info in a grid if it exists... is this possible?

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Kevin, Feb 26, 2004
    #1
    1. Advertising

  2. > What is the correct way to check for this inside a grid?
    >
    > <% If Container.DataItem("from_fly_from") <> "" then %>
    >
    > I want to only display info in a grid if it exists... is this possible?


    Kevin, the easiest way is to probably use a TemplateColumn with a "helper
    function". I discuss how to do this at
    http://datawebcontrols.com/faqs/CustomizingAppearance/ConditionalFormatting.shtml,
    as well as in my book, ASP.NET Data Web Controls Kick Start.

    Happy Programming!

    --

    <shameless plug>
    For more information on the DataGrid, DataList, and Repeater controls,
    consider picking up a copy of my latest book:

    ASP.NET Data Web Controls
    http://www.amazon.com/exec/obidos/ASIN/0672325012/4guysfromrollaco
    </shameless plug>

    Happy Programming!

    Scott Mitchell

    http://www.4GuysFromRolla.com
    http://www.ASPFAQs.com
    http://www.ASPMessageboard.com

    * When you think ASP, think 4GuysFromRolla.com!
    Scott Mitchell [MVP], Feb 26, 2004
    #2
    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. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    927
    Mark Goldin
    Jan 17, 2004
  2. SenthilVel
    Replies:
    0
    Views:
    931
    SenthilVel
    Jun 7, 2006
  3. George1776

    Out-of-memory errors and caching errors.

    George1776, Aug 28, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    1,272
    George1776
    Sep 14, 2006
  4. Lance Wynn
    Replies:
    1
    Views:
    1,814
    Lance Wynn
    Feb 3, 2008
  5. yawnmoth
    Replies:
    97
    Views:
    4,655
    Bent C Dalager
    Feb 27, 2009
Loading...

Share This Page