7 Answers, 1 is accepted
0
Accepted
Hi Pierre,
Thank you for this question.
Yes, it is possible to change the "Add new row" text in RadGridView. You merely need to set the AddNewRowMessageString property of the LocalisationSettings property of the RadGridView.
Let us know if you have other questions.
Kind regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for this question.
Yes, it is possible to change the "Add new row" text in RadGridView. You merely need to set the AddNewRowMessageString property of the LocalisationSettings property of the RadGridView.
Let us know if you have other questions.
Kind regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Mike
Top achievements
Rank 1
answered on 27 May 2008, 08:06 PM
I have the same question as Pierre. I want to change the add row text. I followed the suggestion from Jack and set the LocalizationSettings/AddNewRowMessageString to simply "Add New Row...". When i run the form, the gridview add row still has the default text.
i am using Q1 2008.
any help is appreciated.
i am using Q1 2008.
any help is appreciated.
0
Hi Mike,
Thank you for this question.
In Q1 2008, we introduced a new localization system in RadGridView. Now you are able to customize all strings in the grid using the RadGridLocalizationProvider class. There is a localization example under the RadGridView branch in the Examples application that comes included with our product.
Consider the following code snippet:
I hope this helps. Let me know if you have other questions.
Kind regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for this question.
In Q1 2008, we introduced a new localization system in RadGridView. Now you are able to customize all strings in the grid using the RadGridLocalizationProvider class. There is a localization example under the RadGridView branch in the Examples application that comes included with our product.
Consider the following code snippet:
class MyLocalizationProvider: RadGridLocalizationProvider |
{ |
public override string GetLocalizedString(string id) |
{ |
if (id == RadGridStringId.AddNewRowString) |
{ |
return "My custom add new row string goes here."; |
} |
return base.GetLocalizedString(id); |
} |
} |
RadGridLocalizationProvider.CurrentProvider = new MyLocalizationProvider(); |
I hope this helps. Let me know if you have other questions.
Kind regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

John Hughes
Top achievements
Rank 1
answered on 07 May 2010, 01:04 AM
Is it possible to have a different AddNewRowString for different levels of hierarchy? See my example below.
* Click here to add a new Job
+ Job1
+ Job2
- Job3
* Click here to add a new contractor
+ Contractor1
+ Contractor2
Thanks,
John
* Click here to add a new Job
+ Job1
+ Job2
- Job3
* Click here to add a new contractor
+ Contractor1
+ Contractor2
Thanks,
John
0
Hello Mike,
You can handle the ViewRowFormatting event to solve this issue. Please consider the code snippet below:
I hope this helps.
Kind regards,
Jack
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can handle the ViewRowFormatting event to solve this issue. Please consider the code snippet below:
void
radGridView1_ViewRowFormatting(
object
sender, RowFormattingEventArgs e)
{
GridViewNewRowInfo newRowInfo = e.RowElement.RowInfo
as
GridViewNewRowInfo;
if
(newRowInfo !=
null
)
{
if
(newRowInfo.DataRowInfo !=
null
|| e.RowElement.Children[1].Visibility == ElementVisibility.Visible)
{
e.RowElement.Text =
""
;
}
else
if
(newRowInfo.ViewInfo.ParentRow !=
null
)
{
e.RowElement.Text =
"Click here to add a new contractor"
;
}
else
{
e.RowElement.Text =
"Click here to add a new Job"
;
}
}
}
I hope this helps.
Kind regards,
Jack
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

John Hughes
Top achievements
Rank 1
answered on 11 May 2010, 01:23 AM
Thanks Jack. This code solves my problem......almost. What is happening now is that after I click on Add Contractor and get a new row, the text Add Contractor is written over the top of the cells in the row. This makes it hard to tell what you are looking at in the row. Once you are done with the row and add another one, then the text is not written there any more, but it does show up on the "new" row. I have changed the AddNewRowPosition to PinnedRowPosition.Bottom. Would that be causing this problem?
Any thoughts or suggestions would be appreciated.
Thanks,
John
Any thoughts or suggestions would be appreciated.
Thanks,
John
0
Hi John,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Despite my efforts, I was not able to reproduce the issue. Could you please send me your project? I will investigate the issue further and will try to find the best option for you. I am looking forward to your reply.
Please note that you have to open a new support ticket in order to attach your project.
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.