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

Client OnRowDropping handler is called when other events occur

5 Answers 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 16 May 2016, 12:51 AM

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>

 

5 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 18 May 2016, 12:31 PM
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.
0
Paul
Top achievements
Rank 1
answered on 22 May 2016, 03:55 PM
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.
0
Doug
Top achievements
Rank 1
answered on 27 Mar 2018, 06:58 PM
Was ever fixed by Telerik?  I am running into this issue now.
0
Paul
Top achievements
Rank 1
answered on 27 Mar 2018, 07:01 PM
I don't know if it was fixed. Once I implemented the above-mentioned workaround by changing the UI a bit I stopped testing the original use. But the workaround has been completely stable.
0
Doug
Top achievements
Rank 1
answered on 27 Mar 2018, 07:05 PM
Thanks for confirming Paul.  I am not sure my manager will be acceptable with this workaround, but I will float it by him.  To clarify what you did; you basically added a "handle" in the form of a column, that user has to click on in order to drag row?
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Paul
Top achievements
Rank 1
Doug
Top achievements
Rank 1
Share this question
or