This is a migrated thread and some comments may be shown as answers.

DataFormDataField width

1 Answer 139 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Johannes
Top achievements
Rank 1
Johannes asked on 17 Jun 2015, 02:10 PM

I want to change the width of the label part of DataFormDataField. The correct place to edit should be the controls ControlTemplate:

<Grid.ColumnDefinitions>
  <ColumnDefinition Width="*"/><!-- Label -->
  <ColumnDefinition Width="2*"/><!-- Editor -->
  <ColumnDefinition Width="24"/><!-- ? Icon -->
</Grid.ColumnDefinitions>
 

 I want this to be something like: 

<Grid.ColumnDefinitions>
  <ColumnDefinition Width="{Binding LabelWidth}" /><!-- LabelWidth = Attached property? -->
  <ColumnDefinition Width="2*"/>
  <ColumnDefinition Width="24"/>
</Grid.ColumnDefinitions>

 

The width should not be a fix value in the ControlTemplate. It should be variable so different DataForms can have different label widths. Is that possible?

 

Johannes

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 Jun 2015, 03:05 PM
Hi Johannes,

A possible way to achieve such customization is to create a custom DataFormDataField by overriding the default one. Such approach is discussed in the Label customization in DataFormXField forum thread.

Please give it a try and let me know if you need further assistance.

Best Regards,
Stefan X1
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataForm
Asked by
Johannes
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or