Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Saturday, August 15, 2009

Use Column Mapping with MappingType.Hidden to Hide Columns in a DataTable

It is possible to use Column mapping with MappingType.Hidden to hide columns in a DataTable of a Dataset before the Fill with the following:

myDS.Tables[0].Columns[i].ColumnMapping = MappingType.Hidden;


Of course, 0 may be substituted with the table name as a string. Unfortunately, this is not very useful if the Fill has already created the DataSet. In that case I would probable just want to use an item template in my data display control (such as a GridView) to output the specific fields. The other option is to run the delete columns on the DataTable, which is simply inefficient. Another losing option is to run a select command on the DataTable, which might have its uses for simply acquiring in memory data as opposed to viewing it.

References: http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=3888

3 comments:

Taravrak said...

herbal phentermine side effects phentermine 37.5mg cheap Phentermine diet pills stimulate the hypothalamus gland in our brain and inhibit those neurotransmitters that urge us to have food at any time. Thus help us to suppress our appetite for a longer period. So that's why it has been proved that much more improved results can be achieved if added it to one's daily health routine. Gilbert phentermine diet plan Would you want the actual story on the best fat burner? With some many corporations claiming they have the most effective fats burner, how you can what's for real? Simple, you ask actual folks to share their real results. What you're about to learn could not make you very completely satisfied- however if you want the TRUTH- keep reading. This is what the large companies that promote fat burner tablets or fats burner supplements hope you never hear:No fat burning weight loss plan pill or supplement has been confirmed to work. We're conscious that many firms say they have the perfect fat burner, however they're mendacity to you. Now why would those that promote "high fat burners" or "the most effective fats burner" mislead you?As a result of they want your money. Even attempting this bodyweight loss aim would cause considerable harm to yourself from malnutrition and dehydration - these are symptoms of self-starvation commonly known as the eating disorders anorexia nervosa and bulimia nervosa, both of which are potentially fatal conditions! However, planning to shed ten to twelve pounds in one month although eating smaller, nutritious meals, drinking plenty of drinking water and exercising reasonably can be a perfectly achievable weight reduction objective, and Phen375 can support you meet this target!

Anonymous said...

Hi there! I simply wish to offer you a big thumbs up for the
excellent information you have got here on this post.

I am returning to your web site for more soon.

Stop by my page - armitron

Anonymous said...

e cigarette, smokeless cigarettes, e cigarettes, electronic cigarette starter kit, electronic cigarettes, smokeless cigarettes