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

TexAlignment property of a column

13 Answers 81 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 30 Jun 2015, 02:46 PM

Hello,

it seems that the TextAlignment property of a column is no more taken into account in the Q2 2015 version, with the Office2013 theme.

13 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 02 Jul 2015, 04:10 PM
Hello Patrick,

I have attached is a sample project, in which the TextAlignment property of GridViewDataColumn works correctly with Office2013 theme. Can you please take a look at it and let me know if I am missing something?

Regards,
Stefan
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
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 03 Jul 2015, 06:12 AM

Stefan,

I will take a more in depth look after my holidays.
What I'm currently is that it was working with Q1 2015 SP1 and that it doesn't work with Q2 2015.

My scenario is much more complicated that just a single grid view in a window: the main window is a RibbonWindow, with a Ribbon and a Docking. Inside one of the panes (created dynamically, when the user clicks on a command in the ribbon), I have a TabControl, each tab containing a grid view and some other controls. The TabItem are created dynamically, because the ones to display depends on the data.

So I need to simplify the application just to look where the problem is.

0
Stefan
Telerik team
answered on 06 Jul 2015, 01:46 PM
Hello Patrick,

The demo application I attached was tested with Q2 2015 version.

If you manage to isolate the issue in a sample project, you can send it to us as an attachment in a new support thread, so we can debug it on our side. You can take a look at the Isolating a problem in a sample project blog post for more information.

Best Regards,
Stefan
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
0
Alexey
Top achievements
Rank 1
answered on 07 Jul 2015, 03:50 AM

If the value of the TextAlignment set using style setter, the text in the cell grid view is not aligned.

Sample:

<Style x:Key="NameColumnStyle" TargetType="telerik:GridViewDataColumn">
    <Setter Property="TextAlignment" Value="Right"/>
</Style>

 <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Style="{StaticResource NameColumnStyle}"/>

0
Stefan
Telerik team
answered on 08 Jul 2015, 11:19 AM
Hello Alexey,

Thank you for your feedback.

I investigated the problem and it seems that it is an issue on our side. I have logged it in our bug tracking system. You can check its progress in our Feedback Portal: TextAlignment not respected when applied through Style for GridViewDataColumn.

Best Regards,
Stefan
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
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 30 Sep 2015, 01:04 PM
Evgenia,
3 months later and two new versions: the problem is still here...
0
Stefan
Telerik team
answered on 05 Oct 2015, 11:02 AM
Hello Patrick,

As of Q2 2015 the following issue has been fixed: TextTrimming, TextAlignment and TextWrapping properties set through an implicit style targeting TextBlock is not applied on scrolling.
So, a possible approach for this case would be to update your binaries version and try applying a Style targeting TextBlock. I hope this fits your requirements.

Best Regards,
Stefan
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
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 05 Oct 2015, 11:36 AM

Stefan,
as stated on my first post, the problem started showing at the Q2 2015 version. I'm currently using Q3 2015 and the problem is still here.
One of the column, for example, is defined as:

<tk:GridViewDataColumn DataMemberBinding="{Binding NoPlayer1}"
                       HeaderTextAlignment="Right"
                       IsFilterable="False"
                       IsGroupable="False"
                       TextAlignment="Right"
                       UniqueName="NoPlayer1"
                       Width="50"/>

And the column content is left aligned!
So the problem is not related to a style.

If you want, I can send, in a private message, an URL where you can download the application to take a look.

0
Stefan
Telerik team
answered on 08 Oct 2015, 07:33 AM
Hello Patrick,

If you do not need to use an implicit style, but set the TextAlignment property directly it should be applied. I am attaching a sample application as a demonstration. I have tested it with 2015.2.623 version.

Can you please check it out and let me know in case I am missing something?

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
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 08 Oct 2015, 08:07 AM

Stefan,

I know that, in simple cases, the alignment is working.

My case is much more complicated, because the application contains a Docking, one pane contains a TabControl and a tab contains the GridView. In addition, the GridView is defined as a custom control (to be reusable).

That's why I can provide you with the application and the source if needed.
I can't want to make it public, but I can give you the information in a private message, if possible.

Note also that the application was working fine until version Q2 2015 is out and you correct something on it...

0
Yoan
Telerik team
answered on 09 Oct 2015, 10:43 AM
Hello Patrick,

It will be great if you can provide your sample project which demonstrates the issue. Please open new support ticket and attach it there. I will debug it on my side and I will assist you further.

Regards,
Yoan
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
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 13 Oct 2015, 06:09 AM

Yoan,

I've posted a support ticket with a link to the application and its source code.

Waiting to have news about this problem.

0
Yoan
Telerik team
answered on 15 Oct 2015, 01:51 PM
Hello Patrick,

I will update the other thread once I have more information about the problem.

Regards,
Yoan
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
GridView
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Stefan
Telerik team
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Alexey
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or