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
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
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"?
You may take advantage of the built-in command - BeginInsert. For further information you may refer to our online documentation and demos.
Maya
the Telerik team
Hi Maya,
In my window I have two RadGridview how can I give two different custom text insert button??
Regards,
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
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?
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
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.