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

RadGrid & when EditMode is on Batch issue/bug

1 Answer 53 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
djbox3 asked on 24 Sep 2014, 03:36 PM
Currently I'm facing a RadGrid issue/bug where I'm unable to bring up the correct Edit input row.
Only happen if holding down your mouse while you click on a cell and drag away the mouse elsewhere and let go of the mouse click.

I have created an example scenario. The code is down below.
The first column is a GridTemplateColumn which contains a RadComboBox.
The second column is a GridBoundColumn. 

RadGrid Settings:
                <Selecting AllowRowSelect="False" CellSelectionMode="SingleCell" />
                <ClientEvents OnCellSelected="onCellSelected" />
            <MasterTableView EditMode="Batch">
            <BatchEditingSettings EditType="Cell" />

Here is a scenario to reproduce the symptoms that I'm facing.
* Click on a GridTemplateColumn column cell which brings up the correct EditItemTemplate row and user can enter their input, etc.
* Click on a different GridTemplateColumn column cell and hold down your mouse while you click and drag away the mouse elsewhere and let go of the mouse click.
* Radgrid will highlight the correct GridTemplateColumn column cell however the previous EditItemTemplate row is still displays in edit mode.
* Repeat same step on to a different column.

~Any help would be greatly appreciated.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
        function onCellSelected(sender, a_args)
            var v_gridItem = a_args.get_gridDataItem();
            var selectedColumn = a_args.get_column();
            var dataItem = a_args.get_gridDataItem();
            var output = String.format("The selected cell is located in column with name: " + selectedColumn.get_uniqueName() + " and in row with index: " + dataItem.get_itemIndexHierarchical() + ".");
        <telerik:RadGrid runat="server" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" >
                <Selecting AllowRowSelect="False" EnableDragToSelectRows="false" CellSelectionMode="SingleCell" />
                <ClientEvents OnCellSelected="onCellSelected"/>
            <MasterTableView EditMode="Batch" AutoGenerateColumns="False">
                <BatchEditingSettings EditType="Cell" />
                    <telerik:GridTemplateColumn UniqueName="Data" ItemStyle-BackColor="" FilterControlWidth="100px" ItemStyle-Width="100px" Resizable="false" HeaderStyle-Width="110px"
                        DataField="Col2" HeaderText="Col0" FilterImageUrl="~/images/funnel-icon.png">
                            <%# Eval("Col2")%>
                            <telerik:RadComboBox ID="RadComboBoxData" runat="server" EnableViewState="false" IsCaseSensitive="False" DropDownAutoWidth="Enabled" Height="125" Width="113%"
                                DropDownWidth="250" NoWrap="true" OnClientKeyPressing="" EnableItemCaching="true" />
                     <telerik:GridBoundColumn DataField="Col1" UniqueName="Col1" HeaderText="Col1" HeaderStyle-Width="60px" Resizable="false" AllowFiltering="false"
                        ReadOnly="False" Display="true" Visible="true" ItemStyle-ForeColor="Blue" HeaderStyle-HorizontalAlign="Center" />
using System;
using System.Data;
using Telerik.Web.UI;
public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        DataTable dt = new DataTable();
        for (int i = 0; i < 20; i++)
            dt.Rows.Add(new object[] {i, string.Format("desc_{0}", i)});
        RadGrid1.DataSource = dt;

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 29 Sep 2014, 12:23 PM

You can try to change the OpenEditingEvent to MouseDown and let me know if it works in your specific scenario.


Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question