In my sample application, the XamGrid child row indents as expected. This is not the case for the real WPF application.
How can I decrease or increase the indentation?
Thank you,
Michael
Update: This was solved by setting the Margin of the first column in the Child Band.
<ig:ColumnLayout Key="ActiveOrders" HeaderVisibility="Hidden"> <ig:ColumnLayout.Columns> <ig:TextColumn Key="OrderID" HeaderText="Order ID"> <ig:TextColumn.CellStyle> <Style TargetType="{x:Type ig:CellControl}" BasedOn="{StaticResource {x:Type ig:CellControl}}"> <Setter Property="Margin" Value="20 0 0 0" /> </Style> </ig:TextColumn.CellStyle>
Hello mdperini,
Thank you for your post(s).
I am glad that you were able to find a solution to this issue that you were having. However, an alternate, and perhaps simpler approach to this is to use the Indentation property that exists on the ColumnLayout that contains your columns. This will indent the columns in that particular column layout by the value that you provide.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Thank you very Andrew for the response, your solution is the better. :-)
Note: I noticed that the child row does not scroll like the parent row. Ideally we want the same behavior as the parent (visible columns, column attributes, etc.). I will explore further and start a separate thread on this.
<ig:ColumnLayout Key="ActiveOrders" HeaderVisibility="Hidden" Indentation="60"> <ig:ColumnLayout.Columns> <ig:TextColumn Key="PipsRange" HeaderText="Proximity Level" IsSorted="Ascending" ValueConverter="{StaticResource PipRangeCnv}" IsHideable="False" HorizontalContentAlignment="Left" /> </ig:ColumnLayout.Columns> </ig:ColumnLayout>
-Michael
Thank you for your response. I am glad that my solution is working for you.
Regarding the new issue that you are seeing, would it be possible for you to please provide some more detail on what you mean that "the child row does not scroll like the parent row."? I am not entirely sure what you mean by this. If you would like to discuss it here, please provide more detail on this matter, but if you decide to start a separate thread for it, as it sounds to be more of a separate issue, I will keep an eye out for it.
You are correct that the parent and child row space is determined independently. When a row is expanded, the XamGrid cells are measured based on the largest value that exists in the grid. That is, if the value that exists in the header is larger than all of the cells, then all of the cells for that particular column will be measured to the size of the header, but if there is a value in the cells that is larger than the header text's value, then the width of the cells and the header will measure to that value instead.
Please keep in mind that these values need to be made visible. In the case of the sample project that you have provided me, the headers of your child column layout are being hidden, and so they are taken out of the equation for cell width calculation. Instead, the largest value in the cells is used, and since the values are rather short, the cells are measured to be a very small width.
There is still a way to get the child cells to size to the 'would be' header, though. Instead of setting the HeaderVisibility property on your ColumnLayout, you can set the HeaderRowHeight property. If you set this property to 0, it will essentially hide the headers of your ColumnLayout, but each of the headers will still have a width, and so the cells will measure to that width and the child band will be scrollable again.
I hope this helps you. Please let me know if you have any other questions or concerns on this matter.
Thank you Andrew.
Attached is update version of your sample application, there is no issue with the XamGrid, it is just a matter of, on my part, of understanding the width is calculated.
My current understanding is the parent and child row space is determined independently....scrolling may be enabled for the parent, but not require for the child row, because there is enough space to display the entire child row without scrolling.
Regards,
Hello Michael,
I have been investigating into this child row freezing, no scrolling issue that you are seeing and I have created a sample project based upon the information that you have provided in an attempt to test this issue. However, using the information you have provided, I was not able to reproduce this particular issue in the XamGrid.
I have attached the sample project that I have used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem. If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 16.1.20161.1000 in Infragistics for WPF 2016 Volume 1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Hi Andrew,
Next week I will provide sample appl.
I noticed when you change the HeaderVisibiity to either Collapsed or Hidden, the child row appears frozen, does not participate in scrolling.
<ig:ColumnLayout Key="ActiveOrders" HeaderVisibility="Hidden" Indentation="60"> <ig:ColumnLayout.Columns>