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

Changing NewRow default text

9 Answers 139 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pit Pet
Top achievements
Rank 1
Pit Pet asked on 23 Feb 2011, 09:53 AM
Hi,

how can I change default text of the InsertRow in RadGridView for WPF? The default text is "Click here to add new item".
I also tried to change style of this row. I inserted button to insert row but after clicking this button nothing happened...

regards

9 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 23 Feb 2011, 09:56 AM
Hi Pit Pet,

You may create your own CustomLocalizationManager and predefine the text for that particular key:

public class CustomLocalizationManager : LocalizationManager
    {
        public override string GetStringOverride(string key)
        {
            switch (key)
            {
                case "GridViewAlwaysVisibleNewRow":
                    return "MyOk";
            }
            return base.GetStringOverride(key);
        }
    }

Afterwards, you need to set this CustomLocalizationManager as the default one for the grid:
public MainWindow()
        {
            InitializeComponent();
 
            LocalizationManager.Manager = new CustomLocalizationManager();
        }

 

Regards,
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
Pit Pet
Top achievements
Rank 1
answered on 23 Feb 2011, 10:22 AM
thanks a lot.
This solution solved the problem.
But what when I override default style of NewRow - for example I will put there button. What have I do in Click event of this button to force InsertMode like when I click button with text "Click here to add new item"?
0
Maya
Telerik team
answered on 25 Feb 2011, 03:21 PM
Hi Pit Pet,

You may take advantage of the built-in command - BeginInsert. For further information you may refer to our online documentation and demos.
 

Regards,
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
Clibb
Top achievements
Rank 2
answered on 11 Nov 2011, 01:04 PM
Thanks! Work correctly :)
0
Dharmavaram
Top achievements
Rank 1
answered on 06 Feb 2017, 09:52 AM

Hi Maya,

In my window I have two RadGridview how can I give two different custom text insert button??

 

Regards,

Nagasree

 

0
Stefan
Telerik team
answered on 08 Feb 2017, 02:15 PM
Hi Nagasree,

I am afraid that the localization is performed on application level. Localizing a given control explicitly is not supported.

Best Regards,
Stefan X1
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Alex
Top achievements
Rank 1
answered on 30 May 2019, 04:08 PM

Not to sound unappreciative of this solution, but I'm a little disappointed by it. Localization is more about supporting multiple languages, and it feels silly for me to create a localization manager for the sake of customizing the text of a single element in the GridView control.

What would be the proper procedure for me to formally request a feature for the GridView that allows developers to override the NewRow text via a new DependencyProperty?

0
Dilyan Traykov
Telerik team
answered on 03 Jun 2019, 12:43 PM
Hello Alex,

Thank you for your feedback.

I've taken the liberty of creating a new feature request in our feedback portal on your behalf regarding such a property. If this item accumulates enough votes, we will consider implementing it in a future release. You can follow the item to get notified about any changes in its status.

I do hope you find the suggestion proposed by my colleague earlier applicable for the time being.

If I can further assist you in any way, please let me know.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Alex
Top achievements
Rank 1
answered on 03 Jun 2019, 01:23 PM

Thank you for creating the feature request for me. 

For the time being, I've actually used a different approach from another thread on this forum. 

Tags
GridView
Asked by
Pit Pet
Top achievements
Rank 1
Answers by
Maya
Telerik team
Pit Pet
Top achievements
Rank 1
Clibb
Top achievements
Rank 2
Dharmavaram
Top achievements
Rank 1
Stefan
Telerik team
Alex
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or