GridEditCommandColumn Properties

8 posts, 0 answers
  1. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 16 Jan 2009 Link to this post

    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-
  2. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 16 Jan 2009 Link to this post

    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-
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 16 Jan 2009 Link to this post

    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.
  5. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 16 Jan 2009 Link to this post

    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-
  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 19 Jan 2009 Link to this post

    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.
  7. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 20 Feb 2009 Link to this post

    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-

  8. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Feb 2009 Link to this post

    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.
  9. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 20 Feb 2009 Link to this post

    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-
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017