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

redarrowindicator

Thread ID:

Created:

Updated:

Platform:

Replies:

66635 Jul 31,2007 08:20 PM UTC Jul 31,2007 09:56 PM UTC Windows Forms 1
loading
Tags: Grouping
zach
Asked On July 31, 2007 08:20 PM UTC

Is there a way to draw 'x's in a similar fashion to the the redarrowindicator when dragging is disabled for a column?

haneefm [Syncfusion]
Replied On July 31, 2007 09:56 PM UTC

Hi Zach,

You can do this by hanlding the TableControlMouseDown event of the grid and draw the image("X") using the DragWindow class. Below is a code snippet that show this task.

private Syncfusion.Windows.Forms.DragWindow dragWindow;
private bool IsDiableColumnDrag = false;

void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
{
Element el = e.TableControl.PointToNestedDisplayElement(e.Inner.Location);
if (el.Kind == DisplayElementKind.ColumnHeader)
{
IsDiableColumnDrag = true;
dragWindow = new Syncfusion.Windows.Forms.DragWindow();
dragWindow.Opacity = .5f;
dragWindow.DragBitmap = SystemIcons.Hand.ToBitmap();
dragWindow.Invalidate();
dragWindow.ShowWindowTopMost();
dragWindow.StartDrag(Control.MousePosition);

}
}

Please refer to the attached sample for implementation and let me know if this helps.
DrawDragXInGrid.zip

Best regards,
Haneef

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

;