shemul
2013-01-24T15:32:16Z
Hi , all
I am using iGrid.
I used this code for make my text uppercase and its work fine
Private Sub iGrid1_TextEditChange(ByVal lRow As Long, ByVal lCol As Long)
iGrid1.TextEditText = (UCase(iGrid1.TextEditText))
End Sub
but the problem is that the cursor auto comes in first character screenshot 
I tried to fix the problem with this code but no hope
Private Sub iGrid1_TextEditChange(ByVal lRow As Long, ByVal lCol As Long)
iGrid1.TextEditText = (UCase(iGrid1.TextEditText))
iGrid1.SelStart = Len(iGrid1.TextEditText)

End Sub

PLEASE HELP ME
Igor/10Tec
2013-01-24T16:09:01Z
If you use the TextEditText property, you replace the WHOLE edited text and get that issue.

Here is the proper solution of how to implement this task in iGrid ActiveX:

Private Function IsLowerCaseChar(ByVal CharCode As Long) As Boolean
   IsLowerCaseChar = (CharCode >= &H61) And (CharCode <= &H7A) ' letters from 'a' to 'z'
End Function

Private Function GetUpperCaseChar(ByVal CharCode As Long) As Long
   GetUpperCaseChar = CharCode - &H20
End Function

Private Sub iGrid1_RequestEdit(ByVal lRow As Long, ByVal lCol As Long, ByVal lCharCode As Long, bCancel As Boolean, sText As String, lMaxLength As Long, eTextEditOpt As iGrid500_10Tec.ETextEditFlags)
   If IsLowerCaseChar(lCharCode) Then
      sText = Chr(GetUpperCaseChar(lCharCode))
   End If
End Sub

Private Sub iGrid1_TextEditKeyPress(ByVal lRow As Long, ByVal lCol As Long, CharCode As Long)
   If IsLowerCaseChar(CharCode) Then
      CharCode = GetUpperCaseChar(CharCode)
   End If
End Sub

If you use a non-English alphabet, you may need to correct the IsLowerCaseChar and GetUpperCaseChar functions for you lang accordingly.