Daniel Plomp
Top achievements
Rank 2
Daniel Plomp
asked on 25 Jun 2008, 06:55 AM
Hi telerik,
I have some trouble finding the properties inside the r.a.d.grid designer for changing the text values for the Edit, Insert and Update buttons when I am in (InPlace) edit-mode.
I've found the ones under EditFormSettings --> EditColumn, but that didn't change the values when editing inside a row?
Am I missing something or do I have to do this in code?
Greetings,
Daniel
I have some trouble finding the properties inside the r.a.d.grid designer for changing the text values for the Edit, Insert and Update buttons when I am in (InPlace) edit-mode.
I've found the ones under EditFormSettings --> EditColumn, but that didn't change the values when editing inside a row?
Am I missing something or do I have to do this in code?
Greetings,
Daniel
7 Answers, 1 is accepted
0
Hello Daniel,
To change the text values of the Edit/Update/Insert/Cancel button when using InPlace editing, set the corresponding properties (EditText, UpdateText, etc.) directly through the GridEditCommandColumn instance you added to the grid.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
To change the text values of the Edit/Update/Insert/Cancel button when using InPlace editing, set the corresponding properties (EditText, UpdateText, etc.) directly through the GridEditCommandColumn instance you added to the grid.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Princy
Top achievements
Rank 2
answered on 25 Jun 2008, 07:06 AM
Hi,
Try setting it in the GRidEditCommandColumn as shown below.
ASPX:
Thanks
Princy.
Try setting it in the GRidEditCommandColumn as shown below.
ASPX:
<telerik:GridEditCommandColumn EditText="Change" UpdateText="Save" CancelText="Exit" ></telerik:GridEditCommandColumn> |
Thanks
Princy.
0
Daniel Plomp
Top achievements
Rank 2
answered on 25 Jun 2008, 07:10 AM
Hmmm... I suppose that works when you have manually added a GridEditCommandColumn?
I checked the options 'Auto generate edit column at runtime' and 'Auto generate delete column at runtime' from the smart tag menu.
So I think I'll have to add it myself and uncheck these properties from the smart tag menu?
Daniel
I checked the options 'Auto generate edit column at runtime' and 'Auto generate delete column at runtime' from the smart tag menu.
So I think I'll have to add it myself and uncheck these properties from the smart tag menu?
Daniel
0
Daniel Plomp
Top achievements
Rank 2
answered on 25 Jun 2008, 07:17 AM
I think it can be done at runtime with this code:
... but then again it is easier to add the columns manually :)
Daniel
protected void grid_ItemDataBound(object sender, GridItemEventArgs e) | |
{ | |
if (e.Item is GridCommandItem) | |
{ | |
(e.Item.Controls[0].Controls[0].Controls[0].Controls[0].Controls[0] | |
as LinkButton).Text = "Insert"; | |
(e.Item.Controls[0].Controls[0].Controls[0].Controls[1].Controls[0] | |
as LinkButton).Text = "Update"; | |
} | |
} |
... but then again it is easier to add the columns manually :)
Daniel
0
Shinu
Top achievements
Rank 2
answered on 25 Jun 2008, 07:41 AM
Hi Daniel,
Try the following code snippet to change the Text properties for the AutoGeneratedEditColumn in the ColumnCreated event.
CS:
Hope this helps..
Shinu.
Try the following code snippet to change the Text properties for the AutoGeneratedEditColumn in the ColumnCreated event.
CS:
protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e) |
{ |
GridColumn col = (GridColumn)e.Column; |
if (col.UniqueName == "AutoGeneratedEditColumn") |
{ |
GridEditCommandColumn editCol = (GridEditCommandColumn)e.Column; |
editCol.UpdateText = "Save"; |
editCol.EditText = "Change"; |
editCol.CancelText = "Exit"; |
} |
} |
Hope this helps..
Shinu.
0
Daniel Plomp
Top achievements
Rank 2
answered on 25 Jun 2008, 07:44 AM
Hi Shinu,
Thanks for thinking with me.
I'll try your solution.
Daniel
Thanks for thinking with me.
I'll try your solution.
Daniel
0
Sacha Rice
Top achievements
Rank 1
answered on 05 Sep 2008, 03:12 PM
Here's the VB version, slightly different but same result, will work for Autogenerated and Manually inserted columns. This is most useful when using a grid to display multiple types of data.
If e.Column.ColumnType.ToString = "GridEditCommandColumn" Then | |
Dim Col As Telerik.Web.UI.GridEditCommandColumn = RadGrid1.Columns(e.Column.EditFormColumnIndex) | |
Col.EditText = "Your Edit Text" | |
Col = Nothing | |
End If |