RadDataForm column merging

0 Answers 38 Views
Top achievements
Rank 1
Satya asked on 17 Aug 2023, 05:35 PM


I was trying to merge the columns in RadDataForm to span a control across multiple coulmns. However I couldn't make it work, can you please help me getting this sorted out. Below is my XAML code

<telerik:RadDataForm x:Name="ToolsForm" AutoGenerateItems="False"
                             HeaderPosition="{OnIdiom Default=Above, Phone=Beside}"
                                     BindingContext="{Binding EditTool}">
<telerik:DataFormGridLayout ColumnCount="{OnIdiom Phone='1', Desktop='3', Tablet='3'}"
<telerik:DataFormRadEntryEditor PropertyName="Name" HeaderText="Tool"/>
<telerik:DataFormCustomEditor PropertyName="FactorName" HeaderText="Factor">
<telerik:RadComboBox Placeholder="-- Select a Factor --"
Text="{Binding Value, Mode=TwoWay}, Source={RelativeSource Mode=TemplatedParent}"
ItemsSource="{Binding Factors}" DisplayMemberPath="Name"/>
<telerik:DataFormRadCheckBoxEditor PropertyName="CanView" HeaderText="Can View"/>
<telerik:DataFormRadCheckBoxEditor PropertyName="CanEdit" HeaderText="Can Edit"/>
<telerik:DataFormRadCheckBoxEditor PropertyName="CanDelete" HeaderText="Can Delete"/>
<telerik:DataFormRadEntryEditor PropertyName="User.FirstName"  HeaderText="User" IsReadOnly="True"/>
<telerik:DataFormRadEntryEditor PropertyName="User.Province" HeaderText="Province" IsReadOnly="True"/>


I want in the below format:

| Column1                                                          | Column2                                                      | Column3                                                    |

| Entry                                                               | Combobox                                                                                                                        |

| CheckBox    | CheckBox    | CheckBox         | Entry                                                            | Entry                                                          |


Thanks, Satya

Telerik team
commented on 18 Aug 2023, 05:49 AM

Hi Satya, 

Send me an image of the exact behavior you want to achieve. When I have more info on the exact setup you are looking for, I can share whether this can be achieved with the control.

In general you cannot merge columns in DataForm. The control has different layout options, so you can create a custom layout. In addition you can use Grouping to arrange the editors in groups. 

Top achievements
Rank 1
commented on 22 Aug 2023, 06:06 PM | edited

Something like this, I want controls to be arranged in 3 columns but I need the flexibility to span across columns or want more than 1 cnotrol in same column etc... for eg: 3 checkboxes below need to be on same column and combox need to span across column 2 and 3

Telerik team
commented on 23 Aug 2023, 05:44 AM

Hi Satya,

The standard GridLayout DataForm provides arranges the editors automatically based on the set column count. 

If you want to manually arrange the editors you can use custom layout with grid columns and rows: 

<telerik:RadDataForm x:Name="dataForm" AutoGenerateItems="False">
                    <Grid ColumnDefinitions="*,*,*" RowDefinitions="*,*">

    <telerik:DataFormRadEntryEditor PropertyName="FirstName" Grid.Column="0" Grid.Row="0"/>
    <telerik:DataFormRadCheckBoxEditor PropertyName="Visited" Grid.Column="0" Grid.Row="1"/>

    <telerik:DataFormDatePickerEditor PropertyName="StartDate" Grid.Column="1" Grid.Row="0"/>
    <telerik:DataFormDatePickerEditor PropertyName="EndDate" Grid.Column="1" Grid.Row="1"/>

    <telerik:DataFormRadComboBoxEditor PropertyName="Accommodation" Grid.Column="2"/>

And the result: 




No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question