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

InPlace Edit - Placement of Update/Cancel Buttons

2 Answers 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 2
Charles asked on 23 Mar 2010, 09:34 PM
I want to not only style the row being edited when using InPlace edition (using <EditItemStyle/>) but I also need to change the placement and add some additional text to the "Update Cancel" link buttons.

What I need to do is make that: "Cancel | Save" instead. Basically reversing the position and adding a pipe character between. So, I'm guessing that I need some sort of EditItemTemplate but there doesn't seem to be one available.

Do you have any samples that come close to the modifications I need to do to the link buttons?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 24 Mar 2010, 06:39 AM

Hello Charles,

Try the following approach by adding LinkButtons in GridTemplateColumn in order to achieve desired behaviour.

C#:

 
    <telerik:GridTemplateColumn>  
        <ItemTemplate>  
            <asp:LinkButton ID="Edit" CommandName="Edit" runat="server">Edit</asp:LinkButton>  
        </ItemTemplate>  
        <EditItemTemplate>  
            <asp:LinkButton ID="Cancel" runat="server" CommandName="Cancel">Cancel</asp:LinkButton>            |  
            <asp:LinkButton ID="Save" CommandName="Save" runat="server">Save</asp:LinkButton>  
        </EditItemTemplate>  
        <HeaderStyle Width="90" />  
    </telerik:GridTemplateColumn> 

-Shinu.

0
Charles
Top achievements
Rank 2
answered on 24 Mar 2010, 03:07 PM
Thanks. That got me pointed in the right direction. Just had to add some code in the EditCommand event and the CancelCommand event. I also had to change the CommandName of the save link to "Update" in order to get the UpdateCommand event to fire.
Tags
Grid
Asked by
Charles
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Charles
Top achievements
Rank 2
Share this question
or