M
Miro
Sorry for the cross post. I am stuck.
I have a datagridview for poker rounds.
Basically there are 3 columns in this datagridview.
"Round"
"SmallBlind"
"BigBlind"
I have an issue when I tab through the new row being added. It does not
'Add' that row, nor setup the 'next blank add row' so I can continue to tab
through that row. ( I hope that makes sense ).
Basically on the "DefaultValuesNeeded" I default ALL the columns for the
user already, if there is already 1 row in the list.
So:
Private Sub dgvBlindRounds_DefaultValuesNeeded( ...
If e.Row.Index > 0 Then
Dim tempRow As DataGridViewRow = Me.dgvBlindRounds.Rows(0)
e.Row.Cells("txtBlindRound").Value =
CType(Me.dgvBlindRounds.Item("txtBlindRound", e.Row.Index - 1).Value,
Integer) + 1
e.Row.Cells("txtSmallBlind").Value =
CType(Me.dgvBlindRounds.Item("txtSmallBlind", e.Row.Index - 1).Value,
Integer) * 2
e.Row.Cells("txtBigBlind").Value =
CType(Me.dgvBlindRounds.Item("txtBigBlind", e.Row.Index - 1).Value, Integer)
* 2
Endif
EndSub
So, this way, once the user enters the first row, and enters the next 'Blank
row ready to be added' it defaults everything for them.
*BUT*, unless the user actually types in one of the cells, the "Next Blank
Row" never shows up. So if the current values that defaulted for the user
are correct, they cannot just 'tab' through all the cells.
How do I get the row to be 'added' if the user tabs through the whole new
row (because all the defaults were correct) and also make it add the 'next
blank row' so the tab key takes the user there and not to another control on
the form.
Thanks,
Miro
I have a datagridview for poker rounds.
Basically there are 3 columns in this datagridview.
"Round"
"SmallBlind"
"BigBlind"
I have an issue when I tab through the new row being added. It does not
'Add' that row, nor setup the 'next blank add row' so I can continue to tab
through that row. ( I hope that makes sense ).
Basically on the "DefaultValuesNeeded" I default ALL the columns for the
user already, if there is already 1 row in the list.
So:
Private Sub dgvBlindRounds_DefaultValuesNeeded( ...
If e.Row.Index > 0 Then
Dim tempRow As DataGridViewRow = Me.dgvBlindRounds.Rows(0)
e.Row.Cells("txtBlindRound").Value =
CType(Me.dgvBlindRounds.Item("txtBlindRound", e.Row.Index - 1).Value,
Integer) + 1
e.Row.Cells("txtSmallBlind").Value =
CType(Me.dgvBlindRounds.Item("txtSmallBlind", e.Row.Index - 1).Value,
Integer) * 2
e.Row.Cells("txtBigBlind").Value =
CType(Me.dgvBlindRounds.Item("txtBigBlind", e.Row.Index - 1).Value, Integer)
* 2
Endif
EndSub
So, this way, once the user enters the first row, and enters the next 'Blank
row ready to be added' it defaults everything for them.
*BUT*, unless the user actually types in one of the cells, the "Next Blank
Row" never shows up. So if the current values that defaulted for the user
are correct, they cannot just 'tab' through all the cells.
How do I get the row to be 'added' if the user tabs through the whole new
row (because all the defaults were correct) and also make it add the 'next
blank row' so the tab key takes the user there and not to another control on
the form.
Thanks,
Miro