Hi,
I have tried different possibilities of AutoFit and Autosize but Auto sizing not works. PFA the sample.
Hello Ramesh,
I've reproduced the behavior you've described with the cell text getting cut off. To work around this you can restyle the underlying XamTextEditor for each cell by adding TextWrapping.
eg. Add the following snippet to your datagrid's FieldSettings
<igWpf:FieldSettings.EditorStyle> <Style TargetType="{x:Type igWpf:XamTextEditor}"> <Setter Property="TextWrapping" Value="Wrap" /> </Style></igWpf:FieldSettings.EditorStyle>
I've attached an image of the "expected results" after applying the code above. Let me know if this does not meet your expectations or have any questions.
Hello Michael,
It still doesn't work because the full text is "Very long data goes here". The above code only works for vertical orientation not the horizontal orientation.
Since the text is wrapping you need to adjust the height as well.
eg.
<igWpf:FieldSettings.EditorStyle> <Style TargetType="{x:Type igWpf:XamTextEditor}"> <Setter Property="TextWrapping" Value="Wrap" /> <Setter Property="Height" Value="50" /> </Style> </igWpf:FieldSettings.EditorStyle>
Let me know if you have any questions regarding this matter.
<igWpf:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igWpf:XamTextEditor}">
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Height" Value="50" />
</Style>
</igWpf:FieldSettings.EditorStyle>
Thanks for your answer.
It would be better if the row height also auto sizeable instead of setting it to 50.
Ramesh,
You can work around this by setting the FieldLayoutSettings property DataRecordSizingMode to SizedToContentAndIndividualSizable.
This was previously discussed here:http://ko.infragistics.com/community/forums/p/50652/266532.aspx#266532
Let me know if you have any questions.