B
Bruce D
I have a datagrid (uggg) that I use and create the columns
programmatically...see below.
objCol = New DataGridTextBoxColumn
objCol.MappingName = "amount"
objCol.HeaderText = "Amount"
objCol.Width = 60
objCol.Format = "C"
objDGTS.GridColumnStyles.Add(objCol)
' create keypress, validating events for this textbox column only
Dim dgtb As DataGridTextBox = CType(objCol.TextBox, DataGridTextBox)
AddHandler dgtb.KeyPress, AddressOf Amount_KeyPress
AddHandler dgtb.Validating, AddressOf Amount_Validating
Everything seems to work great...except that the event "Amount_Validating"
does not fire when I use the "arrow keys" or the "enter key". It fires when
I use the "tab key" or use the mouse to click aournd on the grid. I'm
assuming this has something to do with "focus" or something like that.
Can anyone help me get this event to fire with the enter key/arrow keys?
TIA
-bruce duncan
programmatically...see below.
objCol = New DataGridTextBoxColumn
objCol.MappingName = "amount"
objCol.HeaderText = "Amount"
objCol.Width = 60
objCol.Format = "C"
objDGTS.GridColumnStyles.Add(objCol)
' create keypress, validating events for this textbox column only
Dim dgtb As DataGridTextBox = CType(objCol.TextBox, DataGridTextBox)
AddHandler dgtb.KeyPress, AddressOf Amount_KeyPress
AddHandler dgtb.Validating, AddressOf Amount_Validating
Everything seems to work great...except that the event "Amount_Validating"
does not fire when I use the "arrow keys" or the "enter key". It fires when
I use the "tab key" or use the mouse to click aournd on the grid. I'm
assuming this has something to do with "focus" or something like that.
Can anyone help me get this event to fire with the enter key/arrow keys?
TIA
-bruce duncan