Hi,
As per the requirement , i have a Gridviewcolumn in TreeListView for Icon + Text in a single cell.
I am using data template.
As per the requirement , i have a Gridviewcolumn in TreeListView for Icon + Text in a single cell.
I am using data template.
<
DataTemplate
x:Key
=
"datatemplate"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
Image
Grid.Column
=
"0"
Source
=
"{Binding TreeList_IconImage, Converter={StaticResource ConvertStringToImge}}"
/>
<
TextBlock
Grid.Column
=
"1"
Name
=
"txtText"
/>
</
Grid
>
</
DataTemplate
>
and
in Xaml.cs , C#
GridViewColumn templateColumn = new GridViewColumn();
templateColumn.CellTemplate = (DataTemplate)Resources["datatemplate"];
templateColumn.Header = SLColumnName[ColumnName.Key.ToString()].ToString();
// I want to set bindning to TextBlock inside Datatemplate.
radTreeListView.Columns.Add(templateColumn);
I want to set bindning to TextBlock which is inside Datatemplate.
I dont want to set binding in xaml page as the name of column will come from database.