目前的表现是基于微软标准的formatting策略的。
如果你想要在再次进入Cell的时候,依然显示111111, 需要处理GcMultiRow的EditingControlShowing事件, 在事件中,把e.Control.Text设为当前Cell的Value。
实现代码:
C# 代码:
- private void gcMultiRow1_EditingControlShowing(object sender, GrapeCity.Win.MultiRow.EditingControlShowingEventArgs e)
- {
- CellPosition currentCell = this.gcMultiRow1.CurrentCellPosition;
- //这里可能需要判断currentCell.CellIndex是不是你想处理的那一列cell。
- //if ()
- {
- object value = this.gcMultiRow1.GetValue(currentCell.RowIndex, currentCell.CellIndex);
- if (value != null)
- {
- e.Control.Text = value.ToString();
- }
- }
- }
复制代码 VB 代码:- Private Sub gcMultiRow1_EditingControlShowing(sender As Object, e As GrapeCity.Win.MultiRow.EditingControlShowingEventArgs)
- Dim currentCell As CellPosition = Me.gcMultiRow1.CurrentCellPosition
- '这里可能需要判断currentCell.CellIndex是不是你想处理的那一列cell。
- 'if ()
- ‘ Then
- Dim value As Object = Me.gcMultiRow1.GetValue(currentCell.RowIndex, currentCell.CellIndex)
- If value IsNot Nothing Then
- e.Control.Text = value.ToString()
- End If
- ’End If
- End Sub
复制代码 |