Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
985
Fields width and labels
posted

Hello Team,

I am unable to change the width and label of fields. I presume that labels should be displayed in the application as column names, but field 'names' are displayed instead. I dont want to use field 'names', I want to use 'labels'. Field 'names' correspond to the field names in the list bound to the grid. Also the field 'width' is not having any impact on the fields width in the grid. Please help. 

I have the following xaml code for a grid:

<igWPF:XamDataGrid Grid.Row="1" Height="390" HorizontalAlignment="Left" Margin="10,0,0,0" Name="xamDataGrid1" VerticalAlignment="Top" Theme="IGTheme" BindToSampleData="False" IsNestedDataDisplayEnabled="False" DataSource="{Binding MTOs, Mode=TwoWay, NotifyOnTargetUpdated=True}" BorderThickness="2" BorderBrush="#FF1A008D" IsGroupByAreaExpanded="False" GroupByAreaLocation="None" Width="901" ActiveDataItem="{Binding SelectedMTO, Mode=TwoWay}">
<!--<igWPF:XamDataGrid.FieldLayoutSettings>
<igWPF:FieldLayoutSettings AutoGenerateFields="False"></igWPF:FieldLayoutSettings>
</igWPF:XamDataGrid.FieldLayoutSettings>-->
<igWPF:XamDataGrid.FieldLayouts>
<igWPF:FieldLayout>
<igWPF:FieldLayout.FieldSettings>
<igWPF:FieldSettings AllowEdit="False"/>
</igWPF:FieldLayout.FieldSettings>
<igWPF:FieldLayout.Fields>
<igWPF:Field Name="MTO_ID" Label="ID" DisallowModificationViaClipboard="False" Width="12" >
<igWPF:Field.Settings>
<igWPF:FieldSettings AllowEdit="False" />
</igWPF:Field.Settings>
</igWPF:Field>
<igWPF:Field Name="Client_Name" Label="Client Name" >
<igWPF:Field.Settings>
<igWPF:FieldSettings />
</igWPF:Field.Settings>
</igWPF:Field>
<igWPF:Field Name="MTO_Description" Label="Description" >
<igWPF:Field.Settings>
<igWPF:FieldSettings />
</igWPF:Field.Settings>
</igWPF:Field>
<igWPF:Field Name="mt_dateuploaded" Label="Date Uploaded"/>
<igWPF:Field Name="mt_uploadedby" Label="Uploaded By"/>
<igWPF:Field Name="Date_Modified" Label="Date Modified"/>
<igWPF:Field Name="ModifiedBy" Label="Modified By"/>
<igWPF:Field Name="Status" Label="Status"/>
</igWPF:FieldLayout.Fields>
</igWPF:FieldLayout>
</igWPF:XamDataGrid.FieldLayouts>
</igWPF:XamDataGrid>

I have the following additional questions as well:

- I would like to the wrap the field name. For example 'Customer Names' should be wrapped and each word should be on a separate line, thus reducing the field width while displaying the full field name.

- I would also like to know how to have a field width that is dynamically adjustable depending on the data that is populated in the column.

Thank you and looking forward to your assistance.