Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2008

Tip: Looking for answers? Try searching our database.

DataGridView Column Headers from First Row of Excel DataTable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
noip@joekerswild.com - 10 Feb 2008 04:06 GMT
I'm sure this is something ridiculously simple or just not possible
without custom coding:

How do I tell a DataGridView NOT to create column headers from the
first row of a data table using an Excel datasource?

All I want to do is have the first row of data from the Excel
worksheet be the first row of data in the DataGridView and NOT be the
column headers.

It would seem to be something simple to ask, but for the life of me, I
cannot find out how to do it.  Even in Excel itself, it has a "first
row contains column headers" when importing data.  Surely the
DataGridView should let me turn off that kind of feature?

Thanks in advance.
Just Me - 10 Feb 2008 04:25 GMT
Additional information that might help:

The data adapter is an OleDbDataAdapter object using the Excel
spreadsheet.

A BindingSource's DataSource is set to the data table filled by the
adapter.  Not sure I need this level, but it's there for now.

The DataGridView's datasource is set to the binding source above.

Thanks again.

On Feb 9, 8:06 pm, n...@joekerswild.com wrote:
> I'm sure this is something ridiculously simple or just not possible
> without custom coding:
[quoted text clipped - 12 lines]
>
> Thanks in advance.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.