Hi,
Generally speaking I use an UltraGrid control with few columns of style ColumnStyle.FormattedTextEditor,an UltraDataSource as data source with integer values and implementation of IEditorDataFilter which defines conversionbetween integer values and corresponding words (1 to "One", 2 to "Two", and back "One" to 1, etc.).
Additionally there is 'Auto Resize' button to resize all columns.
private void ultraAutoResizeButton1_Click(object sender, EventArgs e) { this.ultraGrid1.DisplayLayout.PerformAutoResizeColumns(false, PerformAutoSizeType.VisibleRows, false); }
I thought that when I perform auto resize, by clicking 'Auto Resize' button, then all columns will be resized to valuesdisplayed in columns (result of ConversionDirection.OwnerToEditor conversion)but definitely they are resized as if only underlying values (integer values from data source) are taken into account.
Does anyone know how to resize columns to displayed values?
Example code is attached.
1805.Example.zip
Best regards:
Piotr W
Hello Piotr,
I have been investigating the sample project you sent, and it appears that there is a bug in the implementation of the PerformAutoSizeColumns method in that the Value of the cells is what is evaluated, where it should be the Text that is evaluated.
This is unexpected behavior, and as such, I have asked our engineering staff to examine it further. To ensure it receives attention, I have logged it in our internal tracking systems with an ID of 254976. I have also created you a private support case that I will link to this issue so you can be notified when a fix or other resolution becomes available. This support case has an ID of CAS-196736-L7H8T8 and you can access it here.
Please let me know if you have any other questions or concerns on this matter.