We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drag a tree node and drop into Gridview row index based

Thread ID:

Created:

Updated:

Platform:

Replies:

100672 Aug 24,2011 05:49 AM UTC Aug 25,2011 10:40 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Arunkumar.V.R
Asked On August 24, 2011 05:49 AM UTC

Hi,

Just i go through the Drag and Drop Manager on Shoping Cart Sample. The problem which i am facing is Drop the node into grid based on row index.

For Ex: Already I am dropped 3 nodes whiche means (3 rows) in Grid after that i am going to insert the 4th node in between
1st and 2nd row. So now 2nd row swap into rowindex 3 and inserted node goes to row index 2.

Let me know some samples related to drag a treenode and drop into dridview row index based?


Thanks,
Arun


Eswari S [Syncfusion]
Replied On August 25, 2011 10:40 AM UTC

Hi Arun,

Thank you for your interest in Syncfusion products.

Query #1 : Drag a tree node and drop into Grid view row index based

We can achieve your requirement by using the rowIndex value of the dragged row.

Please refer to the following code snippets :

[JavaScript]

function DroppedTarget(grid, EventArgs) {
var records = EventArgs.data;
var params = {
CtrlKeyPressed: EventArgs.event.ctrlKey,
Id: grid.get_element().id,

RowIndex: $(EventArgs.event.originalEvent.target).parents("tr:first").attr("rowIndex") // rowIndex value passed to Dropped action
};


[Controller]

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Dropped(List Records, string Id, int RowIndex)
{
. . .
. . .
foreach (Order ord in Records)
{
NorthwindDataContext db = new NorthwindDataContext();
TempOrders.Insert(RowIndex, ord); // Record dragged with rowIndex value
}
. . ..
. . ..
}


For your convenience ,we have prepared the sample for your reference and same can be downloaded from the following link:

Sample-1254123216.zip

Please try this and let us know if you need any further assistance.

Regards,
Eswari.S




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;