Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I need to have DataGrid without row headers at all (It is aromatically comes at left hand side with > arrow) rows.How to kill this default column and completely hide row headers?.

Any answer will be appreciated:thumbsup:

Thanks,
Imdadhusen.
Posted
Updated 8-Dec-20 0:30am

Modify the style to remove the row headers on the left.
Hide the TopLeftHeaderTemplate template (by sitting the visibility to collapsed) and yoo should get the desired results.
 
Share this answer
 
Comments
Sunasara Imdadhusen 23-Feb-11 1:29am    
Thanks for your valuable input. but i don't know how to set TopLeftHeaderTemplate and where can i write the line because of i am new in SilverLight.

Please provide sample code for more clarification.

Thanks,
Abhinav S 23-Feb-11 1:34am    
You need to look at the styles given at http://msdn.microsoft.com/en-us/library/cc278066(v=vs.95).aspx. Search for TopLeftHeaderTemplate in this style.

Place the customized style in your xaml and then use it in your Datagrid implementation.
Sunasara Imdadhusen 23-Feb-11 1:35am    
Thanks, my vote is 5
Abhinav S 23-Feb-11 1:38am    
Thanks for the vote.
Sunasara Imdadhusen 25-Feb-11 9:21am    
I got the solution using following property.
Nothing special with styles, I create a new project, place grid on the page and set HeadersVisibility="Column".

Thanks,
datagrid1.RecordSelectors = False
 
Share this answer
 
Comments
Richard Deeming 8-Dec-20 7:29am    
There was no such property on the Silverlight DataGrid control. Even if this question hadn't already been solved nine years ago, and Silverlight wasn't a dead technology, you would have added nothing to the discussion.

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