Thanks
Helen
9 Answers, 1 is accepted
May you please elaborate a little bit more about your exact settings?
Regarding the attached pictures I suggest that you need to access the black border around RadTreeListView. Have you changed the BorderBrush of RadTreeListView to Black or maybe I am missing something?
You may share with us the code-snippet you are currently using, thus we would be able to provide you with an appropriate solution. Furthermore I believe that the best option is to send us a small repro in a new support ticket where we can see what happens.
Vanya Pavlova
the Telerik team
<
telerik:RadTreeListView
x:Name
=
"MyTreeListView"
Grid.Row
=
"2"
Grid.ColumnSpan
=
"2"
Margin
=
"8"
AutoGenerateColumns
=
"False"
BorderBrush
=
"Black"
IsReadOnly
=
"True"
SelectionMode
=
"Single"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
CanUserResizeColumns
=
"False"
CanUserSortColumns
=
"False"
ShowGroupPanel
=
"True"
HierarchyColumnIndex
=
"0"
ItemsSource
=
"{Binding DataView, ElementName=SBDomainDataSource}"
SelectionChanged
=
"MyTreeView_SelectionChanged"
>
<
telerik:RadTreeListView.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=DepartmentName}"
Width
=
"150"
/>
</
DataTemplate
>
</
telerik:RadTreeListView.ItemTemplate
>
<
telerik:RadTreeListView.SortDescriptors
>
<
telerik:SortDescriptor
Member
=
"DepartmentName"
SortDirection
=
"Ascending"
></
telerik:SortDescriptor
>
</
telerik:RadTreeListView.SortDescriptors
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding People}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewColumn
Width
=
"50"
/>
<
telerik:GridViewDataColumn
x:Name
=
"departmentColumn"
Header
=
"Department"
UniqueName
=
"ColDept"
DataMemberBinding
=
"{Binding Path=Department.DepartmentName, Mode=TwoWay}"
IsReadOnly
=
"True"
ShowFieldFilters
=
"False"
/>
<
telerik:GridViewDataColumn
x:Name
=
"surnameColumn"
Header
=
"Surname"
UniqueName
=
"ColLastName"
DataMemberBinding
=
"{Binding Path=LastName, Mode=TwoWay}"
TextWrapping
=
"Wrap"
IsReadOnly
=
"True"
ShowFieldFilters
=
"False"
SortingState
=
"Ascending"
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
x:Name
=
"firstnameColumn"
Header
=
"First Name"
UniqueName
=
"ColFirstName"
DataMemberBinding
=
"{Binding Path=FirstName, Mode=TwoWay}"
TextWrapping
=
"Wrap"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
x:Name
=
"extColumn"
Header
=
"Extension"
DataMemberBinding
=
"{Binding Path=Extension}"
TextWrapping
=
"Wrap"
IsReadOnly
=
"True"
/>
<
telerik:GridViewImageColumn
x:Name
=
"thumb"
Header
=
"Image"
DataMemberBinding
=
"{Binding Path=imageData, Mode=TwoWay }"
ImageWidth
=
"100"
IsReadOnly
=
"True"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
The data source is a master-detail of Department (Department_uid, DepartmentName, People) where People is an EntityCollection<Person>. All I want is ti have the DepartmentName field displayed beside the Expander.
Within the departmentColumn just directly specify the DepartmentName and it would be correctly displayed:
<
telerik:GridViewDataColumn
x:Name
=
"departmentColumn"
Header
=
"Department"
UniqueName
=
"ColDept"
DataMemberBinding
=
"{Binding
Path=DepartmentName
, Mode=TwoWay}"
IsReadOnly
=
"True"
ShowFieldFilters
=
"False"
/>
Vanya Pavlova
the Telerik team
Are you saying I have to define a column group in the ItemTemplate's DataTemplate?
Generally you do not have to use the RadTreeListView's ItemTemplate property in such manner. I tested your code by my side and I was able to get the same effect from the attached picture. When you are specifying such binding in the department column the values for the respective DepartmentName property were not displayed. By that reason I suggested to change the binding as it was shown in my previous reply. Change the binding remove the RadTreeListView's ItemTemplate and let me know what happens.
In case of any misunderstandings let me know.
Vanya Pavlova
the Telerik team
Thanks
Cheers,
Helen
In this case you have to edit the template of GridViewHeaderCell. There you may find the parts named PART_SortIndicator (which represents the sort indicator of a column and is of type Path) and the PART_DistinctFilterControl (which represents the filtering control of a column and is of type FilteringDropDown). Just remove them from the template and the corresponding states where they are used.
Vanya Pavlova
the Telerik team
Thanks