One of the requirements I have for the Datagrid is to allow the user to resize all the columns to there liking and beable to save off the widths and reapply them when to go back to the page at a later time.
I figure I can just look through all the Fields in the FieldLayout, and read off the width, but is there an easier way to extract that information and put it back ?
Thanks
DK
In the current version, there is no built in mechanism for saving the user customizations but you should submit a suggestion for this feature: http://devcenter.infragistics.com/Protected/RequestFeature.aspx
In the interim, you would have to iterate the Fields in the FieldLayout and look at the (Cell|Label)WidthResolved values and use those to initialize the (Cell|Label)Width when you load them back in. Note, in the current builds available, the resolved properties will not return the resized value but this issue has been reported internally and will be addressed in the next hotfix. You may want to submit a report to the support group and reference issue BR25223 so you can be notified when the hotfix is available.
Hey Andrew,
What you posted make sense, pretty simple for me to apply the widths back in during a FieldLayoutInit event.
However, I would like to capture when the user changes the column widths, and update my local list of column widths.
I tried to use the SizeChangedEvent on the LabelPresenter and HeaderPresenter and a few other classes. But all these give me a SizeChanged event no matter how the column got resized.
Is there an event tied specficly to when the user resizes a column?
I want to capture it and go ahead and update my stored column widths.
Any recommendation on how I could do this ?