Adding Column headers (Dataset/Datagrid)

J

James

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top