PDA

View Full Version : [CLOSED] Grid Row Order using the Plug-in



leonardm
May 23, 2014, 10:03 PM
Hi,

I'm using the GridDragDrop plugin to do re-ordering of my grid rows and I want to attach an event to the drop event. So that I can update the order field in the grid because I need to save the order of the items back to the database.

I tried to do the following...


.View(X.GridView()
.Plugins(X.GridDragDrop()
.DragText("DRAG AND DROP TO RE-ORDER")
.AddListener("onDrop", "alert('Dropped');")
)
)

But the event is not firing. Is there a way to attach to the plugin's drop event?

Please advise.

Daniil
May 26, 2014, 6:52 AM
Hi @leonardm,

Please use:

.View(
X.GridView()
.Listeners(e => e.Drop.Handler = "alert('Drop')")
)

leonardm
May 27, 2014, 4:02 AM
Hi @leonardm,

Please use:

.View(
X.GridView()
.Listeners(e => e.Drop.Handler = "alert('Drop')")
)

Thanks Daniil. You can close this now.