C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to hide a column in Winforms Datagrid


Posted Date: 19 Feb 2007    Resource Type: Code Snippets    Category: Winforms DataGrid

Posted By: vivekthangaswamy       Member Level: Gold
Rating:     Points: 10



This code is to hide specific columns in the DataGrid in a WinForms Application.


DataGridTableStyle ColHidStyle = new DataGridTableStyle();

ColHidStyle.MappingName = "HideTest";

dataGrid1.TableStyles.Add(ColHidStyle);

ColHidStyle.GridColumnStyles["Modifier"].Width = 0;

// Below is an alternate approach

objDs.Tables["myTableName"].Columns["myColumnName"].ColumnMapping = MappingType.Hidden;




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Previous Resource: Change the color of a datagrid column based on the value in that column
Return to Discussion Resource Index
Post New Resource
Category: Winforms DataGrid


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

audio conferencing services

Contact Us    Privacy Policy    Terms Of Use