Solved

DataTable Column MappingType C#

Posted on 2009-04-14
1
644 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 describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

20 Experts available now in Live!

Get 1:1 Help Now