Solved

DataTable Column MappingType C#

Posted on 2009-04-14
1
659 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

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