Hi
I copied the xamDataGrid theme/style from the sample stock trading application on the infragistics samples. I have an issue with the datagrid where as I scroll down to the bottom of the grid, the scroll bar disappears and I can no longer scroll using the mouse. The view gets stuck at this position. I can interact with the cells but cannot move the records. It can be reset if i use the filter.
Files: XamDataPresenterStyle.xml defines the grid style.
below files define the scroll bar style.
Styles.xml
CommonStyles.xml
Could you please advise what is the issue here and how to resolve it?
Hello Alok,
I am glad your solution is working now.
Please let us know if you have any more questions.
Sincerely,ZhivkoAssociate Software Developer
Hi Zhivko,
I didn't see same behavior as you on my side. Not sure why. If I scroll to bottom (using mouse wheel) then the scroll bar would disappear and then i cannot scroll up. strange it was different behavior.
Your suggestion helped to solve the problem but I didn't want to fix the height of the grid. I Want the height to be automatically adjustable when user resizes the screen. I Wasn't aware of the Stack's property. I changed it to grid and now the grid is working as expected.
I have tested the sample application you have attached and I was unable to reproduce the issue you are having when the scroll bar disappears. I have attached a simple .gif file where you can see how it works on my side.
I observed that your XamDataGrid is located inside a StackPanel. I assume that this can introduce some issues with scrollbars, since the StackPanel will measure its children with infinity in the direction of the orientation. If the orientation is vertical as in your scenario, the children are measured with an infinite height and then arranged with that height. So a list control like a grid or listbox will be as tall as needed to show all their children. If those children happen to be taller than the containing StackPanel then they will just be clipped. You can read more details regarding this from the following thread:
https://ko.infragistics.com/community/forums/p/106831/503690.aspx#503690
What I can suggest is to set the HeightInInfiniteContainers property of VewSettings class in XamDataGrid to some default height, for example:
<igDP:XamDataGrid x:Name="myGrid" GroupByAreaLocation="None" Width="auto" Height="auto" Style="{StaticResource XamDataGridStyle1}"> <igDP:XamDataGrid.ViewSettings> <igDP:GridViewSettings HeightInInfiniteContainers="250"/> </igDP:XamDataGrid.ViewSettings> </igDP:XamDataGrid>
Let me know if you have any questions.