I have a WPF app that has a structure of a grid with 2 columns. Column 1 is a time and column 2 is another grid. I found that when I bind 100s of data points the performance is very slow so I converted over to a XamGrid fort he virtualization ability but trying to style the XamGrid to look like how I styled the WPF grid is difficult.
Where is the documentation on the available styling options on each of the components of the XamGrid? Why is there a XamGrid and a XamDataGrid and are the styling options the same? One item I can not seem to find any way to configure is the vertical scroll bar. Is there a way to style this? What about the alternate row background color? It appears I have to retemplate the entire control to get the configurability I want but there is no documentation on what the structure currently is so I do not know what to override.
My grid needs no special functionality such as grouping or summaries or calculations. I just need a performant grid that I can bind up to several thousand data objects to and have it displayed on the screen within 2 seconds. The WPF grid takes upwards of 10 seconds to display.
Hello,
The CellControl which makes up each Cell in the Row contains a ContentPresenter inside of its template to display the data. This Content Presenter has a Margin of 5. You can change this by including the style for the CellControl and setting the Padding to 0.
Please let me know if you have any questions.
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
I'm using the component xamgrid.
I'm trying to reduce the size of the row so they can display more rows in the same space. I use the xamgrid RowHeight property but the information in each cell is aligned below and leave a space at the top. I need to reduce that space to 1 pixel to display more information.
I attached an image of the grid I use. The letter is Calibri to 9 points and rowHeight is 20. I need to remove the space marked in blue.
Thank you very much.
Hello Mike Dutra,
I am following up if there's any further assistance that I can provide.
Mike Dutra said:The XamGrid is used inside a custom user control that I use in 2 places in my app. In one place the vertical scrollbar shows up fine in the other the scrollbar is hidden until I click inside the grid. The grid actually re-sizes to accommodate the scrollbar once I click in there indicating it was collapsed (or not there at all), not just hidden. Can you suggest anything that might make the scrollbar not appear until the grid is clicked? I have tried to narrow down what the difference between the 2 uses are but have been unable to find anything that makes any difference.
I have no suggestions at this point though you can provide more information on it's usage and I can look into further if there's anything that I can provide.
Thanks Duane,
That code did indeed allow me to change the width of the scrollbars. I had attempted something similar by copying the control template from the generic.xaml that was in the XamGrid folder in the samples. For some reason adding in those templates really messed up the look of the scrollbars.
I still have one further issue though. The XamGrid is used inside a custom user control that I use in 2 places in my app. In one place the vertical scrollbar shows up fine in the other the scrollbar is hidden until I click inside the grid. The grid actually re-sizes to accommodate the scrollbar once I click in there indicating it was collapsed (or not there at all), not just hidden. Can you suggest anything that might make the scrollbar not appear until the grid is clicked? I have tried to narrow down what the difference between the 2 uses are but have been unable to find anything that makes any difference.