Default behavior of DataGrid when I expand rows is that all of them are moved to right. I use TranslateTransform.X for RenderTransform on DataRowPresenter with own converter to move this row to left to level out expanded rows with first row. Now rows offset is ok,but the problem it that I have blank space (17px wide if expand first level tree) on the end of all DataRows. it looks like using transformation move rows by 'hard' but grid still see space it takes.
How can I remove this space after moving rows to left? Or maybe You have better idea on suppress datagrid behavior with moving row to right when expand rows tree?
Hello Lukasz,
Thank you for your post. I have been looking into it and I can suggest you see this forum thread:
http://www.infragistics.com/community/forums/t/56968.aspx
where there are different sample, where there is no indentation, no headers, synchronized headers, etc. in various combinations. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Hello Stefan,
I see example in HierarchicalGrigWithHiddenHeaders.zip but using of Margin = "-20,0,0,0" on DataRecordPresenterStyle not solve my problem because it only move rows on every level 20px to right.
I need to remove indent on every level, even when I expand hierarchical data.
In the referenced forum thread there is a sample called "RiskDemo", where the margin is calculated dynamically based on the level and it is increased as you are going deeper in the hierarchy. Please take a look at it and tell if this s what you want to achieve.
Hello,
I use nesting depth converter used in that example. It remove indent from left side of rows, but on the right side I still have indent when I expand rows (hierarchy level * 17px). Do You have solution for this ?
I try to add change rigth margin but its not help:
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null) return Binding.DoNothing;
if (parameter!=null && parameter.ToString() == "cvp") return new Thickness((((int)value / 2) * -17),0,(((int)value / 2) * -17),0); else
return -(((int)value / 2) * 17); }
Could you please send us an isolated sample project, where your issue is reproduced, so we could be able to investigate this further for you?