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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl : change the selected record/row in drag over event

Thread ID:





43224 Apr 19,2006 02:09 AM UTC Apr 20,2006 10:01 AM UTC WinForms 7
Tags: Grouping
Asked On April 19, 2006 02:09 AM UTC

when I drag an item over the grid, can it change the selected record(or current element) as well? Because I need to get the value of the record when I do ''drag leave event''. thank you

Administrator [Syncfusion]
Replied On April 19, 2006 06:07 AM UTC

Hi Clement, Sorry for the delay in responding. I have updated your previous forum thread. http://www.syncfusion.com/Support/forums/message.aspx?MessageID=42942 Regards, Calvin.

Replied On April 19, 2006 07:22 AM UTC

Thank you Calvin! 1) in your sample (HighLight.zip), When I drag over the grid, one row''s color will change to red color based on the X and Y axis. My question is when I release the mouse''s button(or DragLeave), how to move the current selected row to the row which I release the button(make it be the focused row)? 2) After I run DoDragDrop(gridGroupingControl1.DoDragDrop("test", DragDropEffects.Move | DragDropEffects.Copy)) , I cannot click the ''PlusMinus icon''. Why? Thanks.

Administrator [Syncfusion]
Replied On April 19, 2006 12:54 PM UTC

Hi Clement, Attached is a rough try sample to move the record by DragDrop. While doing drag drop over the nested table you have to also take care of the parent id value. And I was not able to reproduce the send issue. It works fine even after calling the DoDragDrop. Can you see the issue in the attached sample? Regards, Calvin.


Replied On April 20, 2006 03:04 AM UTC

Sorry, Calvin I explain what problem I face again : There is a arrow in the current selected record. My question is how can I change the selected record during ''DragLeave or DragOver''? Thanks, Calvin

Administrator [Syncfusion]
Replied On April 20, 2006 05:47 AM UTC

Hi Clement, Sorry for misunderstanding your question. The current record can be retrieved using the below snippet code and the current record values can be changed using the record.SetValue() method. The DragLeave event will be triggered when you drag and leave the grid control. The current record values can be set just after calling the DoDragDrop to change the record values after doing drag drop from the grid to some other control, since you know when DoDragDrop mode ends that is when the call to DoDragDrop returns. The below snipped code can aslo be used to cahnge the current record values in the DragOver event handler. Element inEl = this.gridGroupingControl1.Table.GetInnerMostCurrentElement(); if (inEl is GridRecord) { GridRecord rec = inEl as GridRecord; System.Diagnostics.Debug.WriteLine(rec); rec.SetValue("colName", value); } Let us know if you are trying for something different. Hope this time I got your requirement, but not sure. Regards, Calvin.

Replied On April 20, 2006 06:06 AM UTC

Thanks, but that is not what I want. Let''s hold it first. I did attach the program (Based on your sample[42942]) to you. Can you help me to check the problem : 1) after I did add the ''Drag Drop Event'', I cannot expend the child table any more, Why? Thank you calvin


Administrator [Syncfusion]
Replied On April 20, 2006 10:01 AM UTC

Hi Clement, Please refer to the modified sample. In the MouseDown event handler, only if the clicked cell is a RowHeaderCell then the DragDrop operation should be done. I have uncommented the conduction checking that you have commented. And hope this will answer also for the first question. Regards, Calvin.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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