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

change the flow direction of a specific column

2 Answers 278 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Evgeny
Top achievements
Rank 1
Evgeny asked on 15 Mar 2011, 05:38 PM
Hello,

I have a RadGridView control with flow direction set from right to left.
Inside the grid I have a MaskedTextBoxColumn that is used to display and edit a DateTime object.

I want to have only this column with flow direction from left to right so the date is displayed to the left of the time.
I don't see FlowDirection Property on this column or on any other column.
If I'm setting the FrameworkElement.FlowDirection property it is being ignored.

Is it possible?

Thanks,
Evgeny

2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 16 Mar 2011, 10:21 AM
Hello Evgeny,

You may create a style targeting the corresponding element and assign it to that specific column. For example:

<telerik:GridViewMaskedTextBoxColumn Mask="(###) ### - ####" MaskType="Standard"
                                                 DataMemberBinding="{Binding StadiumCapacity}" DataFormatString="{}{0:(###) ### - ####}">
                <telerik:GridViewMaskedTextBoxColumn.CellStyle>
                    <Style TargetType="telerik:GridViewCell">
                        <Setter Property="FlowDirection" Value="LeftToRight" />
                    </Style>
                </telerik:GridViewMaskedTextBoxColumn.CellStyle>
            </telerik:GridViewMaskedTextBoxColumn>

This the flow direction will be changed in view-mode of the column. If you want to change it in edit-mode too, you have to create a style for the RadMaskedTextBox and again set the FlowDirection property. 
 

All the best,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Evgeny
Top achievements
Rank 1
answered on 17 Mar 2011, 05:47 AM
Thanks a lot
Tags
GridView
Asked by
Evgeny
Top achievements
Rank 1
Answers by
Maya
Telerik team
Evgeny
Top achievements
Rank 1
Share this question
or