or
When the user scroll to the middle or the end of the grid and then I use beginupdate() and endupdate()
The scroll position return to the beginning of the grid and not stay where it was.
Thank you
Dror.
Hi,
As in topic ... How to manage column size offset ?
Please take a look into attached screen shot, I've marked offsets I'd like to modify with a blue arrows.
Regards.
Public Class RadForm1 |
Private _cellModifyBegin As Boolean |
Private _currentEditCell As Integer |
Private Sub RadForm1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
_cellModifyBegin = False |
Try |
grdCustomers.EnterKeyMode = Telerik.WinControls.UI.RadGridViewEnterKeyMode.None |
Me.CustomerTableAdapter.Fill(Me.CustomerApps.Customer) |
Catch ex1 As System.Exception |
Debug.WriteLine(String.Format("Failed in frmMain2.frmMain2_Load - Exception: {0}", ex1.ToString())) |
My.Application.Log.WriteException(ex1) |
MessageBox.Show(String.Format("An error has ocurred. Message : {0}", ex1.Message())) |
Finally |
Debug.WriteLine("End ---> frmMain2.frmMain2_Load") |
My.Application.Log.WriteEntry(String.Format("End ---> {0:00}:{1:00}:{2:00}:{3:0000} frmMain2.frmMain2_Load", Now.Hour, Now.Minute, Now.Second, Now.Millisecond)) |
End Try |
End Sub |
Private Sub grdCustomers_CellBeginEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellCancelEventArgs) Handles grdCustomers.CellBeginEdit |
Debug.Print(String.Format("grdCustomers_CellBeginEdit. RowIndex={0}, CellIndex={1}", e.RowIndex, e.ColumnIndex)) |
If _currentEditCell <> e.ColumnIndex Then |
' this cell got into Edit mode due to user tabbing away from a previous cell edit |
e.Cancel = True |
Return |
End If |
_cellModifyBegin = True |
End Sub |
Private Sub grdCustomers_CellDoubleClick(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles grdCustomers.CellDoubleClick |
Debug.Print(String.Format("grdCustomers_CellDoubleClick. RowIndex={0}, CellIndex={1}", e.RowIndex, e.ColumnIndex)) |
_currentEditCell = e.ColumnIndex |
e.Row.Cells(e.ColumnIndex).BeginEdit() |
End Sub |
Private Sub grdCustomers_CellEndEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles grdCustomers.CellEndEdit |
If grdCustomers.ActiveEditor.IsModified Then |
Debug.Print(String.Format("grdCustomers_CellEndEdit. RowIndex={0}, CellIndex={1}", e.RowIndex, e.ColumnIndex)) |
CustomerTableAdapter.Update(CustomerApps.Customer) |
grdCustomers.Update() |
End If |
_cellModifyBegin = False |
End Sub |
End Class |