RadGridView RowIndicator width

1 Answer 36 Views
GridView
Jiri
Top achievements
Rank 1
Jiri asked on 04 Aug 2022, 12:12 PM

Hi,

in wpf, in telerik:RadGridView I can not change width of the RowIndicator column (the very first one where the arrow points at the selected row.). There is only visibility property, but nothing else.

Is there a way to change it?

thank you,

J.

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 04 Aug 2022, 03:51 PM

Hello Jiri,

To achieve this requirement, extract the default control templates of the GridViewHeaderRow and GridViewRow elements. Then, locate the Border element with x:Name="PART_IndicatorPresenter", which is present in both of the templates, and modify its Width property. Finally, create two additional Styles with TargetType="GridViewHeaderRow" and TargetType="GridViewRow" and set the modified templates to their Template properties.

An important thing to consider is that if the Xaml version of our assemblies is used, each StaticResource present in these control templates would have to be extracted as well. Otherwise, an exception will occur for the missing resources.

With this said, I have attached a sample project, which shows how to achieve this result when using the Office_Black theme. The application is meant to be used with the NoXaml version of the assemblies.

Regards,
Stenly
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Jiri
Top achievements
Rank 1
commented on 09 Aug 2022, 12:03 PM

Thank you very much,

I hoped its just a constant somewhere in default template :-)

OK, I will give it a try,

Jiri.

Stenly
Telerik team
commented on 09 Aug 2022, 02:14 PM

Let me know if I could be of any further help regarding this matter.
Tags
GridView
Asked by
Jiri
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or