Hide Column By Null Value

Discussion in 'ASP .Net Web Controls' started by CanoeGuy, Sep 2, 2005.

  1. CanoeGuy

    CanoeGuy Guest

    I establish my connection, run my stored procedure and fill a DataSet. I
    bind the DataSet to a DataGrid. When I display the DataGrid some of the
    columns in the DataGrid are Null all the way from the top to the bottom. Can
    I hide just the null columns? If so, how?

    Thanks
    --
    Joe Goeke
     
    CanoeGuy, Sep 2, 2005
    #1
    1. Advertising

  2. I think your only solution would be to use a loop testing each DataRow in
    the DataSet. If they are all null, set the related controls' Visible
    property in the DataGrid's templates to False. Good Luck!
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "CanoeGuy" <> wrote in message
    news:...
    >I establish my connection, run my stored procedure and fill a DataSet. I
    > bind the DataSet to a DataGrid. When I display the DataGrid some of the
    > columns in the DataGrid are Null all the way from the top to the bottom.
    > Can
    > I hide just the null columns? If so, how?
    >
    > Thanks
    > --
    > Joe Goeke
     
    Nathan Sokalski, Sep 3, 2005
    #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. Replies:
    5
    Views:
    27,001
    Mike Schilling
    Mar 29, 2006
  2. Keithb
    Replies:
    2
    Views:
    1,163
  3. Col
    Replies:
    1
    Views:
    637
    peter koch
    Apr 21, 2006
  4. Replies:
    0
    Views:
    831
  5. mike
    Replies:
    1
    Views:
    212
    Aaron [SQL Server MVP]
    Sep 16, 2004
Loading...

Share This Page