Repost: DataGrid with no rows

Discussion in 'ASP .Net' started by kgs, Nov 18, 2003.

  1. kgs

    kgs Guest

    I get argument out of range exception when my datasource
    does not have any rows to display in datagrid.

    Right now if there are no rows i get a
    blank area of datagrid. no header no footers.

    what should i do to display header only without any rows.
    here is the snippet of code.

    Try

    mydataGrid.DataSource = myDS
    mydataGrid.DataBind()
    Catch
    --No rows. just display only header.
    End Try
    Appreciate any help
     
    kgs, Nov 18, 2003
    #1
    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. Subba Rao via DotNetMonster.com

    script for moving rows up and down and traverse thru rows of HTML table

    Subba Rao via DotNetMonster.com, Mar 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    8,241
    Subba Rao via DotNetMonster.com
    Mar 19, 2005
  2. helpful sql
    Replies:
    0
    Views:
    817
    helpful sql
    May 19, 2005
  3. Arjen Hoekstra
    Replies:
    0
    Views:
    565
    Arjen Hoekstra
    Aug 2, 2005
  4. Jason James

    Rows the rows of a grid view?

    Jason James, Aug 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    397
    Jason James
    Aug 10, 2006
  5. VijayRama
    Replies:
    2
    Views:
    2,332
    Gregory A. Beamer
    Oct 12, 2009
Loading...

Share This Page