Why the data of second column shifted to right due to treview Child display

ss

I have 3 different columns
First contains some text block and one row also contains a treeview (see "Clearing Prices" in snap shot attached). second column contains again textblock (its absent in case of treeview child) . Whereas the third columpn contains button which shifts little bit in right .
What i want is to i want to allign the data of third column (buttons)just below each other. This disturbance of allignment (shift in right of third column) is due to the child of TreeView ("ClearingPrices").

Martin

The buttons in the treeview's ItemTemplate are shifted right because each RadTreeViewItem has an indent based on its level. This indent moves the entire content of the item to right and all elements placed inside the template are moved. This is why the buttons are not aligned.

In order to align them you can use RelativeSource binding to get the RadTreeViewItem inside your ItemTemplate and set a Margin on the buttons so that they are aligned as you like. Here is an example in code:

Ans the ouput is all the buttons shifts to left on manually setting to level = -55; whereas i just want the buttons inside the treeview to shift left so that they allign. I any solution for this problem ?
Please see the photo of GUI now.

Martin

Note that the code snippets from my last reply was just a sample that was not completely implemented and its purpose was just to describe the approach. This is why some of the mentioned methods was missing.

However, I prepared a project that demonstrate the approach. Note that this implementation is merely a suggestion that is not well tested and I cannot guarantee that it will work in all possible case. I recommend you to test it properly and modify it if needed to fulfill your requirement. Please give the project a try and let me know if it helps.

Regards,
Martin
Telerik

Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.