2010-02-20 9 views

답변

2

나는 이것이 아마도 당신에게 너무 늦다는 것을 알고 있지만 아마도 다른 사람을 도울 것입니다. 나는 당신이 그리드의 BeforeCellActivate 이벤트를 연결하고자한다고 생각한다. 다음은 VB.Net의 샘플입니다.

Private Sub ugGrid_BeforeCellActivate(ByVal sender As Object, _ 
    ByVal e As Infragistics.Win.UltraWinGrid.CancelableCellEventArgs) _ 
    Handles ugGrid.BeforeCellActivate 

'find out if this is the column you are looking for, 
'in this case I want Column with Key = "UnitNumber" 
'also in this case, my Editor is a Masked Editor 
'and I want to put in a customized mask 
    Select Case e.Cell.Column.Key 
     Case "UnitNumber" 
      Dim maskedEdit As UltraMaskedEdit = _ 
       DirectCast(e.Cell.EditorControl, UltraMaskedEdit) 

      Dim newmask As String = GetRulesBasedMask(_ 
       e.Cell.Row.ListObject, maskedEdit.InputMask) 

      maskedEdit.InputMask = newmask 

    End Select 
End Sub 
관련 문제