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 6 2771
Miro,
What do you think that the word Data mean in a DataGridView
I see that you are using a Grid which is build like a (List)View, but where
is your data?
Cor
"Miro" <mi**@beero.comwrote in message
news:Oi*************@TK2MSFTNGP06.phx.gbl...
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 see that you are using a Grid which is build like a (List)View, but
where is your data?
My row is my data in my datagridview.
My Fiile is actually :
FileName: BlindRounds
Fields:
BlindRoundID (key unique id )
Round (integer)
SmallBlind (integer)
BigBlind (integer)
RoundTime (datetime)
Instead of the user inputing 'Round, SmallBlind, BigBlind, RoundTime', 9
times out of 10, the next round is usually double the last.
So if the user inputs everything in the first data row, and tabs to the next
'blank add row', then I know what I should "Default" all the data to.
Round will be +1 the last,
SmallBlind will be double the last smallblind
BigBlind will be double the last BigBlind,
and RoundTime will be equal to the last RoundTime.
So im hoping the user should just have to 'tab' through all the fields
available to him without making any changes and as soon as they get to the
last column in the datagridview, it 'adds' that datarow, and starts a new
'blank'' datarow for the whole process to start over again and this time
were on 'round 3'.
Once the user is happy with an X amount of rounds then they click the save
button and everything saves back to the db.
So for your question, that is my data, but since I can mathematically
calculate 90% of the time what ALL the values of the new row should be. The
user might not need to actually edit / change any column.
Right now the user HAS TO change / edit a column for it to 'add' the 'next'
blank row for the AllowUserToAddRows property of the datagrid view.
Im looking for the 'event' or something to call 'somewhere' that I guess
"Simulates" an edit as soon as he tabs out of the last column, or I guess I
can do it as soon as I default all the data.
So since I can mathematically calculate all the columns of the next row - if
the user 'tabs' through all the fields then I want to assume that they have
'approved' the next rows data and continue on.
Thus they are able to just 'hold' the tab key for about 5 seconds and they
just entered a minute or two's worth of data.
Thanks,
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message
news:OY**************@TK2MSFTNGP05.phx.gbl...
Miro,
What do you think that the word Data mean in a DataGridView
I see that you are using a Grid which is build like a (List)View, but
where is your data?
Cor
"Miro" <mi**@beero.comwrote in message
news:Oi*************@TK2MSFTNGP06.phx.gbl...
>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
Miro,
Simple make a datatable, set that to a bindingsource.datasource and set that
again to your DataGridView, everything becomes than more easy to handle
\\\
Dim dt as new DataTable
dim dc1 as new Column
dim dc2 as new column
dt.columns.add(dc1)
dt.columns.add(dc2)
'make and add as much columns as you need
for i = 0 to 2
dim dr as dt.newrow
dt.rows.add(dr)
next
dim bs as new BindingSource
bs.Datasource = dt
MyDataGridView.DataSource = bs
///
This is created in this message so watch typos or whatever,
Cor
"Miro" <mi**@beero.comwrote in message
news:Ox*************@TK2MSFTNGP06.phx.gbl...
>I see that you are using a Grid which is build like a (List)View, but where is your data?
My row is my data in my datagridview.
My Fiile is actually :
FileName: BlindRounds
Fields:
BlindRoundID (key unique id )
Round (integer)
SmallBlind (integer)
BigBlind (integer)
RoundTime (datetime)
Instead of the user inputing 'Round, SmallBlind, BigBlind, RoundTime', 9
times out of 10, the next round is usually double the last.
So if the user inputs everything in the first data row, and tabs to the
next 'blank add row', then I know what I should "Default" all the data to.
Round will be +1 the last,
SmallBlind will be double the last smallblind
BigBlind will be double the last BigBlind,
and RoundTime will be equal to the last RoundTime.
So im hoping the user should just have to 'tab' through all the fields
available to him without making any changes and as soon as they get to the
last column in the datagridview, it 'adds' that datarow, and starts a new
'blank'' datarow for the whole process to start over again and this time
were on 'round 3'.
Once the user is happy with an X amount of rounds then they click the save
button and everything saves back to the db.
So for your question, that is my data, but since I can mathematically
calculate 90% of the time what ALL the values of the new row should be.
The user might not need to actually edit / change any column.
Right now the user HAS TO change / edit a column for it to 'add' the
'next' blank row for the AllowUserToAddRows property of the datagrid view.
Im looking for the 'event' or something to call 'somewhere' that I guess
"Simulates" an edit as soon as he tabs out of the last column, or I guess
I can do it as soon as I default all the data.
So since I can mathematically calculate all the columns of the next row -
if the user 'tabs' through all the fields then I want to assume that they
have 'approved' the next rows data and continue on.
Thus they are able to just 'hold' the tab key for about 5 seconds and they
just entered a minute or two's worth of data.
Thanks,
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message
news:OY**************@TK2MSFTNGP05.phx.gbl...
>Miro,
What do you think that the word Data mean in a DataGridView
I see that you are using a Grid which is build like a (List)View, but where is your data?
Cor
"Miro" <mi**@beero.comwrote in message news:Oi*************@TK2MSFTNGP06.phx.gbl...
>>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
Hi Cor,
My issue is, is that I do not know how many times / rounds the user wants,
and sometimes the blinds are not always double for whatever reason.
I know I could add the rows manually to it, but i was hoping for a solution
where I can just "Tab" thru and it would keep adding it.
But it looks like the 'new' temp row the datagridview addes is in somekind
of a 'dirtystate' or something and until a value is changed in that row - it
assumes its not going to be added and doesnt add another one.
I was looking for something that I can override in that 'new row' and as
soon as the cursor hits that new row I can add it already to the list of
datarows. Simply put, the last one I would make them delete out.
I was just trying to accomplish somethign ( holding tab and proper data gets
added ) that I did some work in another language in another system. The
users loved it. So I was just playing here and trying to re-create it.
Thanks for the help.
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message
news:uS**************@TK2MSFTNGP06.phx.gbl...
Miro,
Simple make a datatable, set that to a bindingsource.datasource and set
that again to your DataGridView, everything becomes than more easy to
handle
\\\
Dim dt as new DataTable
dim dc1 as new Column
dim dc2 as new column
dt.columns.add(dc1)
dt.columns.add(dc2)
'make and add as much columns as you need
for i = 0 to 2
dim dr as dt.newrow
dt.rows.add(dr)
next
dim bs as new BindingSource
bs.Datasource = dt
MyDataGridView.DataSource = bs
///
This is created in this message so watch typos or whatever,
Cor
"Miro" <mi**@beero.comwrote in message
news:Ox*************@TK2MSFTNGP06.phx.gbl...
>>I see that you are using a Grid which is build like a (List)View, but where is your data?
My row is my data in my datagridview. My Fiile is actually : FileName: BlindRounds
Fields: BlindRoundID (key unique id ) Round (integer) SmallBlind (integer) BigBlind (integer) RoundTime (datetime)
Instead of the user inputing 'Round, SmallBlind, BigBlind, RoundTime', 9 times out of 10, the next round is usually double the last. So if the user inputs everything in the first data row, and tabs to the next 'blank add row', then I know what I should "Default" all the data to. Round will be +1 the last, SmallBlind will be double the last smallblind BigBlind will be double the last BigBlind, and RoundTime will be equal to the last RoundTime.
So im hoping the user should just have to 'tab' through all the fields available to him without making any changes and as soon as they get to the last column in the datagridview, it 'adds' that datarow, and starts a new 'blank'' datarow for the whole process to start over again and this time were on 'round 3'.
Once the user is happy with an X amount of rounds then they click the save button and everything saves back to the db.
So for your question, that is my data, but since I can mathematically calculate 90% of the time what ALL the values of the new row should be. The user might not need to actually edit / change any column.
Right now the user HAS TO change / edit a column for it to 'add' the 'next' blank row for the AllowUserToAddRows property of the datagrid view.
Im looking for the 'event' or something to call 'somewhere' that I guess "Simulates" an edit as soon as he tabs out of the last column, or I guess I can do it as soon as I default all the data. So since I can mathematically calculate all the columns of the next row - if the user 'tabs' through all the fields then I want to assume that they have 'approved' the next rows data and continue on. Thus they are able to just 'hold' the tab key for about 5 seconds and they just entered a minute or two's worth of data.
Thanks,
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message news:OY**************@TK2MSFTNGP05.phx.gbl...
>>Miro,
What do you think that the word Data mean in a DataGridView
I see that you are using a Grid which is build like a (List)View, but where is your data?
Cor
"Miro" <mi**@beero.comwrote in message news:Oi*************@TK2MSFTNGP06.phx.gbl... 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
You can,
Simply add in the add button at the bottom on the datagridview and it will
be created in your datasource.
Cor
"Miro" <mi**@beero.comwrote in message
news:ue**************@TK2MSFTNGP02.phx.gbl...
Hi Cor,
My issue is, is that I do not know how many times / rounds the user wants,
and sometimes the blinds are not always double for whatever reason.
I know I could add the rows manually to it, but i was hoping for a
solution where I can just "Tab" thru and it would keep adding it.
But it looks like the 'new' temp row the datagridview addes is in somekind
of a 'dirtystate' or something and until a value is changed in that row -
it assumes its not going to be added and doesnt add another one.
I was looking for something that I can override in that 'new row' and as
soon as the cursor hits that new row I can add it already to the list of
datarows. Simply put, the last one I would make them delete out.
I was just trying to accomplish somethign ( holding tab and proper data
gets added ) that I did some work in another language in another system.
The users loved it. So I was just playing here and trying to re-create
it.
Thanks for the help.
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message
news:uS**************@TK2MSFTNGP06.phx.gbl...
>Miro,
Simple make a datatable, set that to a bindingsource.datasource and set that again to your DataGridView, everything becomes than more easy to handle
\\\ Dim dt as new DataTable dim dc1 as new Column dim dc2 as new column dt.columns.add(dc1) dt.columns.add(dc2) 'make and add as much columns as you need for i = 0 to 2 dim dr as dt.newrow dt.rows.add(dr) next dim bs as new BindingSource bs.Datasource = dt MyDataGridView.DataSource = bs ///
This is created in this message so watch typos or whatever,
Cor
"Miro" <mi**@beero.comwrote in message news:Ox*************@TK2MSFTNGP06.phx.gbl...
>>>I see that you are using a Grid which is build like a (List)View, but where is your data?
My row is my data in my datagridview. My Fiile is actually : FileName: BlindRounds
Fields: BlindRoundID (key unique id ) Round (integer) SmallBlind (integer) BigBlind (integer) RoundTime (datetime)
Instead of the user inputing 'Round, SmallBlind, BigBlind, RoundTime', 9 times out of 10, the next round is usually double the last. So if the user inputs everything in the first data row, and tabs to the next 'blank add row', then I know what I should "Default" all the data to. Round will be +1 the last, SmallBlind will be double the last smallblind BigBlind will be double the last BigBlind, and RoundTime will be equal to the last RoundTime.
So im hoping the user should just have to 'tab' through all the fields available to him without making any changes and as soon as they get to the last column in the datagridview, it 'adds' that datarow, and starts a new 'blank'' datarow for the whole process to start over again and this time were on 'round 3'.
Once the user is happy with an X amount of rounds then they click the save button and everything saves back to the db.
So for your question, that is my data, but since I can mathematically calculate 90% of the time what ALL the values of the new row should be. The user might not need to actually edit / change any column.
Right now the user HAS TO change / edit a column for it to 'add' the 'next' blank row for the AllowUserToAddRows property of the datagrid view.
Im looking for the 'event' or something to call 'somewhere' that I guess "Simulates" an edit as soon as he tabs out of the last column, or I guess I can do it as soon as I default all the data. So since I can mathematically calculate all the columns of the next row - if the user 'tabs' through all the fields then I want to assume that they have 'approved' the next rows data and continue on. Thus they are able to just 'hold' the tab key for about 5 seconds and they just entered a minute or two's worth of data.
Thanks,
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message news:OY**************@TK2MSFTNGP05.phx.gbl... Miro,
What do you think that the word Data mean in a DataGridView
I see that you are using a Grid which is build like a (List)View, but where is your data?
Cor
"Miro" <mi**@beero.comwrote in message news:Oi*************@TK2MSFTNGP06.phx.gbl... 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 got rid of the add button :)
and all the buttons,
so its strictly a tabbing window.
But maybe that is my probelm, I am trying a layout that should not be /Is
not a .net layout.
It was the same idea I used from some greenscreen programming I did.
But what I am starting to see, is that in most cases, the
'AllowUserToAddRows' option on a datagridview, is used for somethign else,
and not what I am intending to use it for.
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message
news:eY**************@TK2MSFTNGP06.phx.gbl...
You can,
Simply add in the add button at the bottom on the datagridview and it will
be created in your datasource.
Cor
"Miro" <mi**@beero.comwrote in message
news:ue**************@TK2MSFTNGP02.phx.gbl...
>Hi Cor,
My issue is, is that I do not know how many times / rounds the user wants, and sometimes the blinds are not always double for whatever reason.
I know I could add the rows manually to it, but i was hoping for a solution where I can just "Tab" thru and it would keep adding it. But it looks like the 'new' temp row the datagridview addes is in somekind of a 'dirtystate' or something and until a value is changed in that row - it assumes its not going to be added and doesnt add another one.
I was looking for something that I can override in that 'new row' and as soon as the cursor hits that new row I can add it already to the list of datarows. Simply put, the last one I would make them delete out.
I was just trying to accomplish somethign ( holding tab and proper data gets added ) that I did some work in another language in another system. The users loved it. So I was just playing here and trying to re-create it.
Thanks for the help.
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message news:uS**************@TK2MSFTNGP06.phx.gbl...
>>Miro,
Simple make a datatable, set that to a bindingsource.datasource and set that again to your DataGridView, everything becomes than more easy to handle
\\\ Dim dt as new DataTable dim dc1 as new Column dim dc2 as new column dt.columns.add(dc1) dt.columns.add(dc2) 'make and add as much columns as you need for i = 0 to 2 dim dr as dt.newrow dt.rows.add(dr) next dim bs as new BindingSource bs.Datasource = dt MyDataGridView.DataSource = bs ///
This is created in this message so watch typos or whatever,
Cor
"Miro" <mi**@beero.comwrote in message news:Ox*************@TK2MSFTNGP06.phx.gbl... I see that you are using a Grid which is build like a (List)View, but where is your data?
My row is my data in my datagridview. My Fiile is actually : FileName: BlindRounds
Fields: BlindRoundID (key unique id ) Round (integer) SmallBlind (integer) BigBlind (integer) RoundTime (datetime)
Instead of the user inputing 'Round, SmallBlind, BigBlind, RoundTime', 9 times out of 10, the next round is usually double the last. So if the user inputs everything in the first data row, and tabs to the next 'blank add row', then I know what I should "Default" all the data to. Round will be +1 the last, SmallBlind will be double the last smallblind BigBlind will be double the last BigBlind, and RoundTime will be equal to the last RoundTime.
So im hoping the user should just have to 'tab' through all the fields available to him without making any changes and as soon as they get to the last column in the datagridview, it 'adds' that datarow, and starts a new 'blank'' datarow for the whole process to start over again and this time were on 'round 3'.
Once the user is happy with an X amount of rounds then they click the save button and everything saves back to the db.
So for your question, that is my data, but since I can mathematically calculate 90% of the time what ALL the values of the new row should be. The user might not need to actually edit / change any column.
Right now the user HAS TO change / edit a column for it to 'add' the 'next' blank row for the AllowUserToAddRows property of the datagrid view.
Im looking for the 'event' or something to call 'somewhere' that I guess "Simulates" an edit as soon as he tabs out of the last column, or I guess I can do it as soon as I default all the data. So since I can mathematically calculate all the columns of the next row - if the user 'tabs' through all the fields then I want to assume that they have 'approved' the next rows data and continue on. Thus they are able to just 'hold' the tab key for about 5 seconds and they just entered a minute or two's worth of data.
Thanks,
Miro
"Cor Ligthert[MVP]" <No************@planet.nlwrote in message news:OY**************@TK2MSFTNGP05.phx.gbl... Miro, > What do you think that the word Data mean in a DataGridView > I see that you are using a Grid which is build like a (List)View, but where is your data? > Cor > "Miro" <mi**@beero.comwrote in message news:Oi*************@TK2MSFTNGP06.phx.gbl... >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 >> >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: DraguVaso |
last post by:
Hi,
I'm using the DataGridView in VB.NET 2.0. The DataSource is a Generic List
of a custom class0: lstMyPersonnes = New List(Of clsPersonne).
When I add a new clsPersonne to lstMyPersonnes,...
|
by: dbuchanan |
last post by:
Hello,
Is this a bug?
Is there some kind of work around?
I want to add default values for a few columns in my datagridview
I found the "DefaultValuesNeeded" event for the datagridview
I...
|
by: Henok Girma |
last post by:
Hello Gurus,
I want to save the state of an unbound DataGridView on my Windows Form
application to an XML file so i can later load it back..
Basically, on my form I have a DataGridView, it's got...
|
by: Rich |
last post by:
Hello,
I am populating a datagridview from a datatable and filtering the number of
rows with a dataview object. Is there a way to retrieve the rows displayed
by the datagridview into a separate...
|
by: bob |
last post by:
Can anyone tell me the best way to update a dataset while it is being
edited/viewed in the DataGridView control? Is this something that
should be inserted into one of the grid's events? or should...
|
by: Mitchell S. Honnert |
last post by:
Is there an equivalent of the DataGrid's DataGridTableStyle for the
DataGridView? If not, is there an easy way to duplicate the
DataGridTableStyle's functionality for the DataGridView?
Here's...
|
by: =?Utf-8?B?TG9zdEluTUQ=?= |
last post by:
Hi All :)
I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView.
True DBGrid has a MultipleLines property that controls whether individual
records span multiple lines. Is...
|
by: jeastman - Hotmail |
last post by:
Hello world
Excuse, not to be written English and it helps me with a translator.
I am new programming in C#.
I made a control inheriting the DataGridView to be able to add controls done
by...
|
by: Andrus |
last post by:
I have DataGridView in virtual mode containing 3500 rows.
In code below, assigning to RowCount value to 3500 takes 8 seconds.
CPU usage goes high at this time.
Stepping by F11 into user code shows...
|
by: priyamtheone |
last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have:
1) Initially all the cells of the dtp column should be...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: kcodez |
last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
| |