Solved

DataTable Column MappingType C#

Posted on 2009-04-14
1
649 Views
Last Modified: 2013-12-17
Hi,

I have 2 question regarding MappingType

I did a column MappingType.Hidden for every column beforehand.

1.So how can i include multiple columns other then using this...
                datatable.Columns["column1"].ColumnMapping = MappingType.Element;
                datatable.Columns["column2"].ColumnMapping = MappingType.Element;
 
2.How can I un"hide" every element?So I can access to every column again?

Thanks for the reply in advance.
0
Comment
Question by:csharp_learner
1 Comment
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 300 total points
ID: 24136485
u can loop thru columns and set the mapping type
for(int i=0;i<datatable.Columns.Count;i++)
{
datatable.Columns[i].ColumnMapping = MappingType.Element;
}

Open in new window

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 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