[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 563
  • Last Modified:

Does a DataTable Column start at Column Index 0?

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?
1 Solution
Éric MoreauSenior .Net ConsultantCommented:
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?
BlakeMcKennaAuthor Commented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now