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 05:17 PM UTC

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 01:31 AM UTC

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 11:44 AM UTC

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 01:20 PM UTC

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

Loader.
Up arrow icon