Hi Guys,
I wanted to auto adjust the size of RowsFieldsDropAreaControl and ColumnsFieldDropAreaControl to fit one header column or one row header. We expect there to be 1 column header, or 1 row header so or maybe a maximum a couple, is it possible you can provide a sample to resize either one of these areas to fit one column header or row header please.
Cheers,
Anand
Hello Anand,
Thank you for your post.
I have been investigating into this, and I don't personally know of a way to get the RowsFieldDropAreaControl and the ColumnsFieldDropAreaControl to resize to content automatically, as they are set to resize to the size of the columns and rows of data that are represented by the additions to them. I am currently working on a sample application for you to demonstrate how you could possibly utilize the ResultChanged event of the data source of the pivot grid to resize these elements. I will have another update for you shortly on this matter.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
I have attached a sample application to demonstrate the resizing of the RowsFieldDropAreaControl and the ColumnsFieldDropArea control by utilizing the ResultChanged event on the data source that is bound to the pivot grid. This event will fire each time a row or column is added, and so the resize can be done then.
The RowsFieldDropAreaControl's sizing is mainly dependent on a sum of the column widths that the entries to that control represents. So, if you resize these columns in the pivot grid, you can resize the RowsFieldDropAreaControl.
The ColumnsFieldDropAreaControl is not dependent on the column widths, so it can be resized directly. Both of these controls can be obtained from the XamPivotGrid by using the Infragistics Utilities class and using the GetDescendantFromName method, using the names "RowsDropArea" and "ColumnsDropArea."
The sample application is attached. Please let me know if you have any other questions or concerns on this matter.
Andrew thanks so much, this works.