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

How to prompt/confirm for drag and drop row in telerik grid

3 Answers 121 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 1
Manish asked on 21 Feb 2018, 09:41 AM

I have implemented the drag and drop row feature of telerik grid. Now i have to comfirm/prompt user for drag and drop row action with some message like 'Are you sure to drag the selected row?'

I have implemented below two events for the same 

1) Client Side: 

function onRowDropping(sender, args) {

// some code to do something

}

2) Code behind:

protected void grd_RowDrop(object sender, GridDragDropEventArgs e)
{

// some code to do something

}

So, Please suggest how can we achieve this functionality.

1) Once user attempt to drag and drop the row, a confirmation popup should come.

2) If user confirm the action row should be dropped and re-ordered.

3) Else action should be reverted from client side itself.

 

Any help would be highely appriciated.

 

Thnaks,

Manish

 

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Feb 2018, 11:05 AM
Hello, Manish, 

Thank you for writing.  

RadGridView handles the whole drag and drop operation by its RadGridViewDragDropService. In the PreviewDragDrop event you can perform the actual reordering of the data bound records. This is the appropriate place where you can show the confirmation message to the user. I have prepared a sample project for your reference which result is illustrated in the attached gif file. 

I hope this information helps. Should you have further questions I would be glad to help. 
 
 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Manish
Top achievements
Rank 1
answered on 21 Feb 2018, 11:33 AM

Hi Dess,

Thank you so much for such a quick response.

Your sample project is a WindowsApplication where you have prompted the user with DialogBox.

But I am working on WebApplication, So can you please help me for WebApplication.

we are trying to achieve it with client side script, If possible. Otherwise we can  are open for code behind event implentation also.

I believe, there should be a way to achieve this for WebApplication also.

Please help/suggest the best.

 

Regards,

Manish

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Feb 2018, 11:44 AM
Hello, Manish,  

Thank you for writing back. 

I would like to note that this forum is related to the Telerik UI for WinForms suite. However, your question seems to be related to another product. Feel free to post your inquiries in the relevant forum: https://www.telerik.com/forums

Thank you for your understanding.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Manish
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Manish
Top achievements
Rank 1
Share this question
or