Field countryName = new Field();countryName.Name = "name";countryName.Label = "Country Name";dataGridCountry.FieldLayouts[0].Fields.Add(countryName);
You can use this:
<igDP:Field>
<igDP:Field.Settings>
<igDP:FieldSettings CellMaxWidth="50" LabelMaxWidth="50"/>
</igDP:Field.Settings>
</igDP:Field>
Hi Alex...
How do i acheive the same thing in xaml? nothing in the code behind.
Thanks
Hi Alex,
and thanks on more time, the LabelMaxWidth does the trick, i thought the CellMaxWidth should do it. Anyway it is working now like below.
edit.Settings.LabelMaxWidth = 20; :-)
Arta,
Artha,
I was not able to reproduce this, but first thing that comes in my mind is to set the label max width also like this (also check for a style or somewhere in your code where you might be overriding this property).
e.FieldLayout.Fields[1].Settings.CellMaxWidth = 20;e.FieldLayout.Fields[1].Settings.LabelMaxWidth = 20;
Test this and let me know if it works in your scenario.
If not, please mention your dll versions in the next post.
Alex.
dataGridCountry.DataSource = countries;
private void dataGridCountry_FieldLayoutInitialized(object sender, Infragistics.Windows.DataPresenter.Events.FieldLayoutInitializedEventArgs e){ e.FieldLayout.Fields[0].Settings.CellMaxWidth = 20;}