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.

How to move the icon when I mousemove in DataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

28225 Apr 27,2005 09:10 AM Apr 28,2005 09:20 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 27, 2005 09:10 AM

Hi, In my DataBoundGrid, I changed the arrow of row header by another icon. I mousemove and move the row by "CurrentCell.MoveTo", but the icon only move to that cell when I mouseup. Could you please tell me how to move the icon with mouse when mousemove. Thanks

Administrator [Syncfusion]
Replied On April 27, 2005 01:17 PM

How do you change the icon? would you please post a sample or the code snipped that your''re using? Regards, Thomas >Hi, >In my DataBoundGrid, I changed the arrow of row header by another icon. > >I mousemove and move the row by "CurrentCell.MoveTo", but the icon only move to that cell when I mouseup. > >Could you please tell me how to move the icon with mouse when mousemove. > >Thanks

Administrator [Syncfusion]
Replied On April 27, 2005 09:31 PM

Hi, I use imageList and replace the arrow icon by my images, the the sample detailing about showing the icon as below: private void dgrSelectedFields_CellDrawn(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellEventArgs e) { GridDataBoundGrid grid = sender as GridDataBoundGrid; if (grid != null && e.ColIndex == 0 && e.RowIndex == grid.Binder.PositionToRowIndex(grid.Binder.CurrentPosition) && e.RowIndex > 0) { Rectangle rect = GridUtil.CenterInRect(e.Bounds, this.imgList.ImageSize); GridStaticCellRenderer.DrawImage(e.Graphics, this.imgList, 0, rect, false); } } While I mousemove on rows in Grid I used this script: this.dgrSelectedFields.CurrentCell.MoveTo(rowNo, 3); Thanks, Khai >How do you change the icon? would you please post a sample or the code snipped that your''re using? > >Regards, >Thomas > >>Hi, >>In my DataBoundGrid, I changed the arrow of row header by another icon. >> >>I mousemove and move the row by "CurrentCell.MoveTo", but the icon only move to that cell when I mouseup. >> >>Could you please tell me how to move the icon with mouse when mousemove. >> >>Thanks

Administrator [Syncfusion]
Replied On April 28, 2005 07:44 AM

Hi Thomas, I can do it now. Thanks >Hi, >I use imageList and replace the arrow icon by my images, the the sample detailing about showing the icon as below: > >private void dgrSelectedFields_CellDrawn(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellEventArgs e) >{ > GridDataBoundGrid grid = sender as GridDataBoundGrid; > if (grid != null && > e.ColIndex == 0 && > e.RowIndex == grid.Binder.PositionToRowIndex(grid.Binder.CurrentPosition) && > e.RowIndex > 0) > { > Rectangle rect = GridUtil.CenterInRect(e.Bounds, this.imgList.ImageSize); > GridStaticCellRenderer.DrawImage(e.Graphics, this.imgList, 0, rect, false); > } >} > >While I mousemove on rows in Grid I used this script: > >this.dgrSelectedFields.CurrentCell.MoveTo(rowNo, 3); > >Thanks, >Khai > >>How do you change the icon? would you please post a sample or the code snipped that your''re using? >> >>Regards, >>Thomas >> >>>Hi, >>>In my DataBoundGrid, I changed the arrow of row header by another icon. >>> >>>I mousemove and move the row by "CurrentCell.MoveTo", but the icon only move to that cell when I mouseup. >>> >>>Could you please tell me how to move the icon with mouse when mousemove. >>> >>>Thanks

Administrator [Syncfusion]
Replied On April 28, 2005 09:20 AM

Hi Khai, What is the solution of the problem? Regards, Thomas

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.

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.

;