Changing NewRow default text

10 posts, 0 answers
  1. Pit Pet
    Pit Pet avatar
    6 posts
    Member since:
    Nov 2009

    Posted 23 Feb 2011 Link to this post

    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
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 23 Feb 2011 Link to this post

    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!
  3. Pit Pet
    Pit Pet avatar
    6 posts
    Member since:
    Nov 2009

    Posted 23 Feb 2011 Link to this post

    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"?
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Feb 2011 Link to this post

    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!
  5. Clibb
    Clibb avatar
    1 posts
    Member since:
    Dec 2010

    Posted 11 Nov 2011 Link to this post

    Thanks! Work correctly :)
  6. Dharmavaram
    Dharmavaram avatar
    101 posts
    Member since:
    Jun 2013

    Posted 06 Feb 2017 Link to this post

    Hi Maya,

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

     

    Regards,

    Nagasree

     

  7. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 08 Feb 2017 Link to this post

    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.
  8. Alex
    Alex avatar
    5 posts
    Member since:
    Aug 2018

    Posted 30 May Link to this post

    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?

  9. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    908 posts

    Posted 03 Jun Link to this post

    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.
  10. Alex
    Alex avatar
    5 posts
    Member since:
    Aug 2018

    Posted 03 Jun in reply to Dilyan Traykov Link to this post

    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. 

Back to Top