Adding Column headers (Dataset/Datagrid)

Discussion in 'ASP .Net' started by James, Sep 21, 2006.

  1. James

    James Guest

    I have a source excel file which I'm reading into a dataset. This works
    just fine, the end user picks which sheet they want and I can access the
    data. But I'm trying to integrate a "First Row Contains Column Headings"
    element. When it's checked, I have no problems. I just bind and have it
    generate the columns automatically.

    However, when it's not checked, I'd like it to just add Column0, Column1,
    etc. etc. for each column in the sheet. Since it's bound to an actual
    datasource (the excel file), when I try to add a header row to the dataset,
    the type conversion fails on integer/double/etc. columns.

    Adding it that way would have been easiest, but I suppose I'm looking at
    manipulating the actual datagrid at this point? If I just add columns, how
    am I going to associate them with columns in the datasource explicitly?

    Sorry for the weird question(s).

    Thanks
     
    James, Sep 21, 2006
    #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. gh0st54
    Replies:
    0
    Views:
    404
    gh0st54
    Jan 30, 2005
  2. gh0st54
    Replies:
    2
    Views:
    5,504
    Eliyahu Goldin
    Jan 31, 2005
  3. =?Utf-8?B?Sm9obiBXYWxrZXI=?=

    Freezing Datagrid Column Headers

    =?Utf-8?B?Sm9obiBXYWxrZXI=?=, Jan 18, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,974
    =?Utf-8?B?Sm9obiBXYWxrZXI=?=
    Jan 18, 2006
  4. Krishna
    Replies:
    0
    Views:
    534
    Krishna
    Jul 13, 2006
  5. apple17
    Replies:
    0
    Views:
    529
    apple17
    Dec 9, 2008
Loading...

Share This Page