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

[Solved] OnRowDrop event not fired with scrollbars enabled

2 Answers 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
nabilus
Top achievements
Rank 1
nabilus asked on 07 Apr 2009, 01:13 PM
Hi.

I have reproduced the row drag drop demo between 2 grids. I can drag drop items from girdA to gridB. The problem arises when I check the enable scrolling checkbox in the smart tag of the gridB. The client side event OnRowDropping is fired but not OnRowDrop on server side (Postback is not called either). If I uncheck the scrolling, everything is fine again.

  <telerik:RadGrid ID="gridA" runat="server"   
        CssClass="style2" GridLines="None" 
        OnRowDrop="gridColumns_RowDrop" 
        OnNeedDataSource="gridA_NeedDataSource"   
        AllowMultiRowSelection="True">  
        <MasterTableView DataKeyNames="positionReport" AutoGenerateColumns="False"   
            ShowHeader="False">  
               <Columns> 
                   <telerik:GridBoundColumn DataField="namereportFR" UniqueName="column">  
                   </telerik:GridBoundColumn> 
               </Columns> 
               </MasterTableView> 
        <ClientSettings AllowRowsDragDrop="True">  
            <Selecting AllowRowSelect="True" /> 
            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
            <ClientEvents OnRowDropping="onRowDropping" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
      
       
        <telerik:RadGrid ID="gridB" runat="server"   
        CssClass="style1" GridLines="None" 
        OnRowDrop="gridColumns_RowDrop" 
        OnNeedDataSource="gridB_NeedDataSource"   
        AllowMultiRowSelection="True" AutoGenerateColumns="False"   
        ShowHeader="False">  
        <MasterTableView DataKeyNames="positionReport">  
               <Columns> 
                   <telerik:GridBoundColumn DataField="namereportFR" UniqueName="column">  
                   </telerik:GridBoundColumn> 
               </Columns> 
               </MasterTableView> 
            <ClientSettings AllowRowsDragDrop="True">  
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
        

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 10 Apr 2009, 02:04 PM
Hello Andre,

RadGrid exposes flexible event-driven mechanism to drag and drop grid records to reorder them within the same grid, move them to different grid instance or drop them over other html element on the page.
The event-driven model allows you to process and complete the drag and drop operation into two phases: client-side and server-side phase.
OnRowDrop event allows you to reorder the items in the source grid or remove them and append these rows to a destination grid instance.

For more information about OnRowDrop and OnRowDropping events with scrollbar enabled, please refer to the following articles:
Items Drag-and-drop
Drag and drop of grid items

Greetings,
Pavlina
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
André
Top achievements
Rank 1
answered on 10 Apr 2009, 09:57 PM
I've already read it maybe 10 times...

I've open a ticket.
Tags
Grid
Asked by
nabilus
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
André
Top achievements
Rank 1
Share this question
or