Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,everybody

Please tell me answer,

Thanks,
My name is Brock.liu
Posted

Everything you can do from XAML you can do from C#. To hide a column, set its Width property to 0. To add a column, you can either add it in advance and hide it then later unhide it, or you can add it through C# code. Note that you can give GridViewColumns an x:Name then reference them from C# using that name. You can also name the GridView that contains the GridViewColumnCollection (in XAML it's known as the GridView.ColumnCollection) and then access the Columns property to visit each column (or add a new column using C#).

wrote:
My name is Brock.liu


No offense, but nobody cares what your name is.

wrote:
Please tell me answer


Maybe you are just being polite, but you are coming off as pushy. Obviously we are here to answer your question, so there is no need to request we do so. Just another friendly tip.
 
Share this answer
 
Ignore the person who called you pushy. I don't think he read where someone told you they don't care about your name and you replied with "please tell me answer".
 
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