Client OnRowDropping handler is called when other events occur

3 posts, 0 answers
  1. Paul
    Paul avatar
    47 posts
    Member since:
    Dec 2008

    Posted 15 May Link to this post

    I have a RadGrid with several client event handlers enabled. If I include an OnRowDropping handler, it gets invoked before either of the other two event handlers (OnRowDblClick and OnRowContextMenu). If I remove the OnRowDropping handler the other two work correctly.

    <telerik:RadGrid ID="RadGridPapers" runat="server"
        AutoGenerateColumns="false"
        ShowGroupPanel="false"
                 
        OnItemDataBound     ="RadGridPapers_ItemDataBound"
        OnItemCommand       ="RadGridPapers_ItemCommand"
        OnRowDrop           ="RadGridPapers_RowDrop"
        >
        <clientsettings AllowRowsDragDrop="true">
            <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
            <ClientEvents
                OnRowDblClick="rowDoubleClick"
                OnRowContextMenu="RowContextMenu"
                OnRowDropping="rowDropping"
                />
        </clientsettings>
     
        <MasterTableView Name="MasterTablePapers"
            DataKeyNames="abstractID"
            Caption="Unscheduled Abstracts (double-click to schedule next, or drag to a timeslot above, or right-click to assign status)"
            NoMasterRecordsText="(No unscheduled Abstracts in this session.)"
            AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="false"
            AllowPaging="false" AllowSorting="false" AllowFilteringByColumn="false"
            EnableLinqGrouping="false"
            CommandItemDisplay="None"
            TableLayout="Fixed" Width="100%"
            >
            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <SelectFields>
                        <telerik:GridGroupByField FieldAlias="Status" FieldName="dispositionName" HeaderValueSeparator=": " />
                    </SelectFields>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="dispositionID" SortOrder="Ascending" />
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>

     

  2. Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 18 May Link to this post

    Hi Paul,

    The cause for this issue is that the client logic is executed fast enough to create a drag-able row which fires the OnRowDropping client event. A possible solution is to check if the row is dropped on the same row as the dragged one. I will forward this issue to one of our developers and they will investigate the issue further.

    Regards,
    Kostadin
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul
    Paul avatar
    47 posts
    Member since:
    Dec 2008

    Posted 22 May in reply to Kostadin Link to this post

    Thank you Kostadin! I fixed the problem by adding a GridDragDropColumn so the double-click and right-click anywhere else in the row do not initiate the row drag. It's working fine now.
Back to Top