Master detail view - different add row watermark text for master and detail view

Hello,

I am trying to put a different text into the 'click to add new row' for the master and detail view - 

I have 

 <UserControl.Resources>
        <Style  TargetType="Syncfusion:AddNewRowControl">
            <Setter Property="AddNewRowText" Value="Click to add new department"/>
            <Setter Property="FontWeight" Value="Bold"/>
        </Style>

    </UserControl.Resources>
   
   in my control but this changes the text for both.

How can I specifically target the detail grids?

I am happy do do this in XAML, or in c# codebehind.

Thanks


1 Reply

MK Muthukumar Kalyanasundaram Syncfusion Team December 18, 2017 12:20 PM UTC

Hi Tim, 

Thank you for contacting Syncfusion support. 

You can achieve your requirement by overriding the style of DetailsViewDataGrid and then apply the style of AddNewRow as like below code, 

Code Snippet: 
<Window.Resources> 
    <Style  TargetType="syncfusion:DetailsViewDataGrid"> 
        <Style.Resources> 
            <Style TargetType="syncfusion:AddNewRowControl"> 
                <Setter Property="AddNewRowText" Value="Custom AddNewRow text"/>                     
            </Style> 
        </Style.Resources> 
    </Style> 
</Window.Resources> 


Please let us know if you have any other question. 

Regards, 
Muthukumar K 


Loader.
Up arrow icon