Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to remove one column in gridview at the time of printing in Windows Application in C#?
Posted
Comments
Maciej Los 14-May-15 2:52am    
What have you tried? Where are you stuck? Post your code and shrtly describe your issue.

Try setting the width to 0 or the visibility property of the column you wish to hide.
 
Share this answer
 
Below Code is very helpful to delete/remove any column
C#
DataTable dt;
if(dt.Columns.Contains("ColumnName"))
  dt.Columns.Remove("ColumnName")


Please give me feedback if there is any issue. Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900