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

Update, cancel only in editmode

2 Answers 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carl-Johan
Top achievements
Rank 1
Carl-Johan asked on 29 Jun 2010, 07:10 AM
I have a radgrid that I edit InPlace.
 
I would like to show Update and Cancel buttons only when the row is in editmode, how do I do that?

2 Answers, 1 is accepted

Sort by
0
Carl-Johan
Top achievements
Rank 1
answered on 29 Jun 2010, 07:52 AM

EditItemTemplate

 

I fixed it myself:
<ItemTemplate>
<asp:ImageButton  CommandName="Edit" CommandArgument='XX' ID="XX" runat="server" ImageUrl="" />
</ItemTemplate>

<EditItemTemplate>
<asp:ImageButton  CommandName="Update" CommandArgument='XX' ID="XX" runat="server" ImageUrl="" />
<asp:ImageButton  CommandName="Cancel" CommandArgument='XX' ID="XX" runat="server" ImageUrl="" />
</EditItemTemplate>

 

0
Shinu
Top achievements
Rank 2
answered on 29 Jun 2010, 08:19 AM
Hi Carl,

As an alernate, you can also use GridEditCommandColumn which is dedicated column for editing/updating the row in grid.

aspx:
 
    <telerik:GridEditCommandColumn UniqueName="editColumn" ButtonType="ImageButton" EditImageUrl="../Images/Edit.gif" 
        UpdateImageUrl="../Images/Refresh.gif" CancelImageUrl="../Images/Cancel.gif" 
        InsertImageUrl="../Images/insert.gif"
    </telerik:GridEditCommandColumn> 


-Shinu.
Tags
Grid
Asked by
Carl-Johan
Top achievements
Rank 1
Answers by
Carl-Johan
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or