Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
10097 | Jan 22,2004 09:47 AM UTC | Apr 6,2004 11:40 AM UTC | WinForms | 5 |
![]() |
Tags: GridControl |
this.grid.CurrentCell.MoveTo(5,2);
If you are trying the in formload, you also may have to set this.grid.ForceCurrentCellMoveTo = true; Private oldRow As Integer = -1 Private oldCol As Integer = -1 Private Sub Grid1_CellDrawn(ByVal sender As Object, ByVal e As GridDrawCellEventArgs) Handles Grid1.CellDrawn Dim cc As GridCurrentCell = Me.Grid1.CurrentCell If e.ColIndex = cc.ColIndex AndAlso e.RowIndex = cc.RowIndex AndAlso Not Me.Grid1.PrintingMode Then Dim brush As New SolidBrush(Me.Grid1.AlphaBlendSelectionColor) Try e.Graphics.FillRectangle(brush, e.Bounds) Finally brush.Dispose() End Try If oldRow > -1 And oldCol > -1 And (oldRow <> e.RowIndex Or oldCol <> e.ColIndex) Then Grid1.RefreshRange(GridRangeInfo.Cell(oldRow, oldCol)) End If oldRow = e.RowIndex oldCol = e.ColIndex End If End Sub
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.
This page will automatically be redirected to the sign-in page in 10 seconds.