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

Delete button in the inserted row disappear

3 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rui
Top achievements
Rank 1
Rui asked on 09 Sep 2015, 09:27 AM

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.

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 11 Sep 2015, 01:06 PM
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
0
Rayne
Top achievements
Rank 1
answered on 04 Jan 2017, 05:56 PM
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?
0
Kostadin
Telerik team
answered on 09 Jan 2017, 11:29 AM
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.
Tags
Grid
Asked by
Rui
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Rayne
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or