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. Image for the cookie policy date

How to move the icon when I mousemove in DataBoundGrid

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

4 Replies

AD Administrator Syncfusion Team April 27, 2005 12: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


AD Administrator Syncfusion Team April 27, 2005 08: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


AD Administrator Syncfusion Team April 28, 2005 06: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


AD Administrator Syncfusion Team April 28, 2005 08:20 AM

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

Loader.
Live Chat Icon For mobile
Up arrow icon