Does a DataTable Column start at Column Index 0?

Posted on 2014-08-04
Last Modified: 2014-08-05
I know this is an elementary question but is the first column in a DataTable referenced as 0 or 1? Also, let's say Column 1 is invisible...does that change the order of the Columns?
Question by:BlakeMcKenna
    LVL 69

    Accepted Solution

    yes it starts at 0.

    a column in a datatable cannot be invisible. maybe you are talking about datagrid? What are you trying to do?

    Author Closing Comment

    No....I know I column in a datatable can't be invisible. I'm assigning the table to a DataGridView and one or more of it's columns are. I only asked the question because it seemed like the values of a DataGridView were changing based on the DataTable. But I think I've resolved it. It was a minor oversight on my part.

    Thanks for the clarification Eric!

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now