I have a case where I use the XamDataGrid only to show the column headers for my own grid. The columns of my grid get synchronized if the user changes the XamDatGrids column sizes, positions or add/remove columns via the FieldChooser. Please take a look at the provided screenshot.
My problem is that the FieldChooser does not show scrollbars in this particular case. Unfortunately we have lot's of columns in this case.
Maybe you should know, that we add a single (hidden) dummy record to the XamDataGrid in order to force the grid to show the column headers.
Sincerely
Tino
Hello Tino,
I'm glad it was able to resolve your issue. Hopefully this proves useful for other members of the community as well.
Hi Rob,
before I went on vacation I was in a hurry and I accidentally replied the (automated) mail :-( My fault.
Your solution works very well for me. Problem is solved.
As always, excellent support.
Hi Tino,
What email address did you send the email? I never saw it.
Regarding the issue though, since your style in the sample did not have an x:Key it will be applied to every ScrollViewer inside the XamDataGrid, including the field chooser. You need to apply this style directly to the specific ScrollViewer you want. Luckily it is pretty easy to apply it directly to the main ScrollViewer in the grid.
First give the style an x:Key such as "MyScrollStyle". Then handle the Loaded event on the XamDataGrid. Inside the loaded event you will use the Infragistics.Windows.Utilities class to find the main ScrollViewer and then apply the style to it.
XamDataGrid grid = sender as XamDataGrid; ScrollViewer sv = (ScrollViewer)Infragistics.Windows.Utilities.GetDescendantFromType(grid, typeof(ScrollViewer), false); sv.Style = grid.Resources["MyScrollStyle"] as Style;
Let me know if you have any questions on this.
Hi Valerie,
no, the problem is still unsolved.
I sent an email to Rob on 04/11/14 with a modified version of his demo app. And I was on vacation the last two weeks.
This was the content of the email.
I found the reason why the scrollbars in the FieldChooser are missing.I have a style that should hide the horizontal scrollbar oft the grid (remember: I use the XamGrid only for the column headers).
Unfortunately this style also hides the scrollbars of the FieldChooser.See attached Scrollbar.jpg and MainWindow.xaml of the provided sample.
How can I hide the scrollbar of the grid but not of the field chooser?
Were you able to resolve your issue?
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support