I have situtation where i have 4 rows and 3 columns where third row contains a tree (which must show child only in third row of first column) and which must show all the data properly vertically alligned (exactly below other, not left or right) in other columns as well. Like this: (see tr2 image).
But actually its not working like this it shifts the column in bit right (because of child cover some area and the data in second column and third column is shifted to right with the same distance). Here is the view (showing the gridlines of row and column). See this: (tt2 image)
You can see in the image that in Second Row "Clearing Prices" click i have a shift of "Launch Step" (column 3) in right. That i want to allign just below each otherMy code to do this is:
In my xaml code I have "RelatedItems" which binds the child of "Clearing Prices like"Equities, Bonds, Futures etc." whereas "EODDataStepsCollection" contains "Conversion Rates, Clearing Prices, Portfolio Evaluations".Why this shift in right of Buttons of 3rd column ("Launch Steps") arises. How to sove this problem ?
But actually its not working like this it shifts the column in bit right (because of child cover some area and the data in second column and third column is shifted to right with the same distance). Here is the view (showing the gridlines of row and column). See this: (tt2 image)
You can see in the image that in Second Row "Clearing Prices" click i have a shift of "Launch Step" (column 3) in right. That i want to allign just below each otherMy code to do this is:
<
telerik:HierarchicalDataTemplate
ItemsSource
=
"{Binding RelatedItems}"
>
<
Grid
ShowGridLines
=
"True"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
//These rows are to show you gridlines shift
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
//these are the tree columns data (first two cvontains text and third one contains a button)
<
TextBlock
Grid.Column
=
"0"
Text
=
"{Binding Label}"
FontWeight
=
"Bold"
Margin
=
"10"
Height
=
"23"
Width
=
"400"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
Visibility
=
"{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
Foreground
=
"{Binding Status, Converter={StaticResource EODStatusFGConverter}}"
/>
<
TextBlock
Grid.Column
=
"1"
Text
=
"{Binding StatusLabel}"
Margin
=
"10"
Height
=
"23"
Width
=
"170"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
Visibility
=
"{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
Foreground
=
"{Binding Status, Converter={StaticResource EODStatusFGConverter}}"
/>
<
Button
Content
=
"{Binding ButtonLabel}"
Grid.Column
=
"2"
VerticalAlignment
=
"Center"
Style
=
"{StaticResource ButtonStyle_Blue}"
Padding
=
"5"
Margin
=
"10"
HorizontalAlignment
=
"Right"
Visibility
=
"{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
IsEnabled
=
"{Binding StepEnabled}"
Command
=
"{Binding ButtonStepCommand}"
/>
</
Grid
>
</
telerik:HierarchicalDataTemplate
>
</
telerik:RadTreeView.ItemTemplate
>
</
telerik:RadTreeView
>
In my xaml code I have "RelatedItems" which binds the child of "Clearing Prices like"Equities, Bonds, Futures etc." whereas "EODDataStepsCollection" contains "Conversion Rates, Clearing Prices, Portfolio Evaluations".Why this shift in right of Buttons of 3rd column ("Launch Steps") arises. How to sove this problem ?