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

GridEditCommandColumn Properties

7 Answers 301 Views
Grid
This is a migrated thread and some comments may be shown as answers.
-DJ-
Top achievements
Rank 1
-DJ- asked on 16 Jan 2009, 12:06 PM
Hi guys,

I'm having some problems with a GridEditCommandColumn in my grid.
With ButtonType set to ImageButton, I can change the EditImageUrl as expected. However I cannot change the
UpdateImageUrl
CancelImageUrl
UpdateText
CancelText

It just has no effect.

Another note on GridEditCommandColumn as well as GridButtonColumn with ButtonType set to ImageButton. Would it not be logical that the Text property should work as a tooltip  with these settings?

Regards,
-DJ-

7 Answers, 1 is accepted

Sort by
0
-DJ-
Top achievements
Rank 1
answered on 16 Jan 2009, 12:50 PM
Hi again,

This problem disappears once you set the EditMode for the grid. While EditMode isn't set it "works" as stated in earlier post.

Regards,
-DJ-
0
Sebastian
Telerik team
answered on 16 Jan 2009, 12:55 PM
Hello -DJ-,

How to change the image urls for the edit column images you can see from the topic in the documentation pointed below:

http://www.telerik.com/help/aspnet-ajax/gridcustomizeactionbuttons.html

Additionally, if you set image button type for edit or button column in the grid, you will need to define your own tooltips for those images as the Text property is applicable only for push or link buttons.

Best regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
-DJ-
Top achievements
Rank 1
answered on 16 Jan 2009, 03:10 PM
Hi Sebastian,

Actually it's not as simple as you say that we need to explicitly define our own tooltips.

The EditText, UpdateText and CancelText do all work as tooltips in IE, since these properties are rendered as "alt". For the same reason they don't show up in FF.

Regarding the first part I stand by my second post, if you don't set a specific EditMode these properties simply don't work.

Regards,
-DJ-
0
Sebastian
Telerik team
answered on 19 Jan 2009, 03:57 PM
Hi -DJ-,

I think that you hit a browser-specific behavior here and testing the same approach with asp ImageButtons with alt attribute values under Gecko-based browsers will produce the same result. Let me know if I am missing something obvious.

The code from the help topic will work with auto-generated edit forms mode. If you would like to specify update/insert/cancel images, define them directly through the respective GridEditCommandColumn's tag.

Best regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
-DJ-
Top achievements
Rank 1
answered on 20 Feb 2009, 12:26 PM
Hi Sebastian,

I am back to this problem.  I'm not actually using images, just trying to translate the texts using valid properties supplied for the GridButtonColumn. Without success I might add.

Check this out:

                    <telerik:GridEditCommandColumn
                    ButtonType="Linkbutton"
                    UniqueName="Edit"
                    HeaderText="Breyta"  <- Works
                    UpdateText="Uppfæra" <- Does not work
                    CancelText="Hætta við" <- Does not work
                    EditText="Breyta" <- Works
                     />

So my problem is straightforward, I cannot translate the update and cancel texts.

Regards,
-DJ-

0
Shinu
Top achievements
Rank 2
answered on 20 Feb 2009, 12:57 PM

Hello DJ,

I hope you are using EditForms. If so, try accessing the Update and Cancel buttons in the EditForm and set its Text property as shown below:
cs:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
 if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
        {  
            GridEditableItem item = (GridEditableItem)e.Item;  
            LinkButton updateButton = (LinkButton)item.FindControl("UpdateButton");  
            updateButton.Text = "Uppfæra";  
            LinkButton cancelButton = (LinkButton)item.FindControl("CancelButton");  
            cancelButton.Text = "Hætta við";  
 
        }   
    }  
 

Thanks
Shinu.
0
-DJ-
Top achievements
Rank 1
answered on 20 Feb 2009, 01:14 PM
Hi Shinu,

Thanks for your input.
There is another simpler way that works. In the MasterTableView you can state the texts like this:
EditFormSettings-EditColumn-CancelText="Hætta við"
EditFormSettings-EditColumn-UpdateText="Uppfæra"

basically this is just a bug report. These properties are exposed in the GridEditCommandColumn, but never get applied.

Regards,
-DJ-
Tags
Grid
Asked by
-DJ-
Top achievements
Rank 1
Answers by
-DJ-
Top achievements
Rank 1
Sebastian
Telerik team
Shinu
Top achievements
Rank 2
Share this question
or