Delete button in the inserted row disappear

4 posts, 0 answers
  1. Rui
    Rui avatar
    14 posts
    Member since:
    Sep 2015

    Posted 09 Sep 2015 Link to this post

    Hello,

    Now I am looking into this demo 

    http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

    When I click "Add new record" button,  I can see that the delete button in the inserted row  is available.

    But I cannot see the delete button with my own code.

    <%@ Page Language="c#" CodeFile="Default.aspx.cs" Inherits="Telerik.GridExamplesCSharp.DataEditing.BatchEditing.Default" %>
      
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <head runat="server">
        <title>Telerik ASP.NET Example</title>
        <link href="styles.css" rel="stylesheet" />
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
     
        <div id="demo" class="demo-container no-bg">
         <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
                AllowAutomaticInserts="True" PageSize="10"
                AllowAutomaticUpdates="True" AllowPaging="True"
                AutoGenerateColumns="False" OnNeedDataSource="ApiGrid_NeedDataSource">
                <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="ProductID"
                    HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False">
                    <BatchEditingSettings EditType="Cell" />
                    <SortExpressions>
                        <telerik:GridSortExpression FieldName="ProductID" SortOrder="Descending" />
                    </SortExpressions>
                    <Columns>
                        <telerik:GridBoundColumn DataField="ProductName" HeaderStyle-Width="210px" HeaderText="ProductName" SortExpression="ProductName"
                            UniqueName="ProductName">
                            <ColumnValidationSettings EnableRequiredFieldValidation="true">
                                <RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
                                </RequiredFieldValidator>
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px" ButtonType="ImageButton"
                            CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowKeyboardNavigation="true"></ClientSettings>
            </telerik:RadGrid>
        </div>
        </form>
    </body>
    </html>

    using System;
    using System.Web.UI.WebControls;
    using Telerik.Web.UI;
      
    namespace Telerik.GridExamplesCSharp.DataEditing.BatchEditing
    {
     
        public class Data
        {
            public string ProductName { get; set; }
            public string ProductID { get; set; }
        }
        public partial class Default : System.Web.UI.Page
        {
            /// <summary>
            ///     Process need data source event from ApiGrid.
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            protected void ApiGrid_NeedDataSource( object sender, GridNeedDataSourceEventArgs e )
            {
                RadGrid1.DataSource = new Data[]
                {
                    new Data()
                    {
                        ProductName = "AAA",
                ProductID ="111"
                    },
                     
                    new Data()
                    {
                        ProductName = "AAA",
                        ProductID ="222"
                    }
                };
            }
        }
    }

     

    Could you please give me some advice?

    Thanks.

  2. Eyup
    Admin
    Eyup avatar
    3841 posts

    Posted 11 Sep 2015 Link to this post

    Hello Rui,

    Please upgrade to the latest release version and let me know whether this resolves the issue.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Rayne
    Rayne avatar
    261 posts
    Member since:
    Sep 2010

    Posted 04 Jan 2017 Link to this post

    I'm having the same trouble. No delete button on batch edit mode. I'm using 2013 Q3. The reason we have not updated to the latest version is because we are using a skin that is no longer available. Is there any other work around for this so that we don't lose our skin by upgrading?
  4. Kostadin
    Admin
    Kostadin avatar
    1733 posts

    Posted 09 Jan 2017 Link to this post

    Hi Rayne,

    I would recommend you to examine the following blog post which discussed how to modify the a default skin by using the Visual Style Builder. Also you get get the obsoleted skins from our skin sharing portal.

    Regards,
    Kostadin
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top