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

[Solved] Update & Cancel button not showing in inline edit mode

5 Answers 915 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 26 Oct 2009, 07:44 PM
Hello,

I have this radgrid that i want to perform edit funtion. Going into edit mode wasn't a problem.
But i can see the UPDATE and CANCEL buttons. here is my radgrid and i use datatable to populate it.
any suggestion?

 <telerik:RadGrid ID="RadGrid1" runat="server" ShowFooter="true" AutoGenerateColumns="False"
                    AllowSorting="true" EnableEmbeddedSkins="True" Skin="Sunset" Width="1000px"
                    EnableLinqExpressions="false" OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="RadGrid1_NeedDataSource1"
                    OnItemCreated="RadGrid1_ItemCreated">
                    <MasterTableView DataKeyNames="Account" EditMode="InPlace">
                        <Columns>
                            <telerik:GridButtonColumn Text="Edit" CommandName="Edit" ButtonType="PushButton">
                                <ItemStyle HorizontalAlign="Center" CssClass="BorderLeft BorderRight BorderBottom" />
                                <FooterStyle CssClass="BorderLeft BorderRight BorderBottom" />
                            </telerik:GridButtonColumn>
                            <telerik:GridBoundColumn DataField="LongAccount" HeaderStyle-HorizontalAlign="Center"
                                UniqueName="LongAccount" HeaderText="Account" ReadOnly="true" ShowSortIcon="false"
                                FooterText="Sub Total">
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Left" Width="100px" CssClass="BorderRight BorderBottom" />
                                <FooterStyle CssClass="BorderRight BorderBottom" />
                            </telerik:GridBoundColumn>
                         
                        </Columns>
                        <EditFormSettings>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableEmbeddedSkins="False">
                    </FilterMenu>
                </telerik:RadGrid>

5 Answers, 1 is accepted

Sort by
0
Casey
Top achievements
Rank 1
answered on 26 Oct 2009, 08:00 PM
Hi Sean,

Have you tried setting the AutoGenerateEditColumn at runtime to true? Do the Update/Cancel buttons appears when you do so? If you want the buttons to appear as the first row you may want to use a GridTemplateColumn with an ItemTemplate containing an Edit button, then have an EditItemTemplate inside the same GridTemplateColumn with the Update and Cancel buttons. Something like the following; you don't have to use LinkButtons if you don't want.

I hope this helps,
Casey

<telerik:RadGrid ID="RadGrid1" runat="server">  
<MasterTableView EditMode="InPlace">  
    <Columns> 
        <telerik:GridTemplateColumn UniqueName="column" HeaderText="Edit">  
            <ItemTemplate> 
                <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Edit">Edit</asp:LinkButton> 
            </ItemTemplate> 
            <EditItemTemplate> 
                <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Update">Update</asp:LinkButton> 
                <asp:LinkButton ID="LinkButton4" runat="server" CommandName="Cancel">Cancel</asp:LinkButton> 
            </EditItemTemplate> 
        </telerik:GridTemplateColumn> 
        ...
    </Columns> 
</MasterTableView> 
</telerik:RadGrid> 
0
Princy
Top achievements
Rank 2
answered on 27 Oct 2009, 05:46 AM
Hello Sean and Casey,

The best approach would be to use a GridEditCommandColumn rather than using a GridButtonColumn or a GridTemplateColumn. When the user presses the edit button for an EditCommandColumn and if the table view is configured for in-line editing, the Update and Cancel buttons automatically appear in place of the edit button. Check out the following help document to find out more on various columns in the grid.
Column types

Thanks
Princy.
0
TonyG
Top achievements
Rank 1
answered on 22 Jun 2012, 09:10 AM
Stumbled across this old thread while researching same topic. I believe Princy wanted to refer to this link:
http://www.telerik.com/help/aspnet-ajax/grid-column-types.html
The site probably changed in the last 2+ years. :b
0
Raghu
Top achievements
Rank 1
answered on 05 Apr 2013, 06:33 PM
I have a problem similar to the thread:
I am not able to add a row because i am not using GridEditCommandColumn , I dont need edit functinality in my grid but if i am not using edit button in grid, i am not able to add new row as i am not able to get Insert and Cancel but because i am not using the edit functionality. So is there any way i can get Insert and Cancel button even if i dont use edit button .
 i dont want to use edit button, i just want to insert new row by clicking add new row .
0
Shinu
Top achievements
Rank 2
answered on 08 Apr 2013, 05:42 AM
Hi,

One suggestion is that you can use a Form Template Edit Form. Also check the demo for more.
Grid - Form Template Edit Form

Thanks,
Shinu
Tags
Grid
Asked by
Sean
Top achievements
Rank 1
Answers by
Casey
Top achievements
Rank 1
Princy
Top achievements
Rank 2
TonyG
Top achievements
Rank 1
Raghu
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or