Click here to Skip to main content
15,911,360 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionWindow Order? Pin
Violinboy215-Nov-07 5:22
Violinboy215-Nov-07 5:22 
AnswerRe: Window Order? Pin
Violinboy218-Nov-07 5:40
Violinboy218-Nov-07 5:40 
QuestionHow to retreave text from ASP.net or HTMl to sql table Pin
Vimalsoft(Pty) Ltd15-Nov-07 4:28
professionalVimalsoft(Pty) Ltd15-Nov-07 4:28 
AnswerRe: How to retreave text from ASP.net or HTMl to sql table Pin
pmarfleet15-Nov-07 7:13
pmarfleet15-Nov-07 7:13 
GeneralRe: How to retreave text from ASP.net or HTMl to sql table Pin
Vimalsoft(Pty) Ltd15-Nov-07 19:16
professionalVimalsoft(Pty) Ltd15-Nov-07 19:16 
GeneralRe: How to retreave text from ASP.net or HTMl to sql table Pin
pmarfleet15-Nov-07 19:43
pmarfleet15-Nov-07 19:43 
GeneralRe: How to retreave text from ASP.net or HTMl to sql table Pin
Vimalsoft(Pty) Ltd15-Nov-07 20:10
professionalVimalsoft(Pty) Ltd15-Nov-07 20:10 
Questioninsert with textboxes and grid on form Pin
softweb7015-Nov-07 4:08
softweb7015-Nov-07 4:08 
Greetings
I have written an insert routine that has the text boxes and a grid with populated with the target "insert" table on the same form.

I am using data bindings:
txtLastName.DataBindings.Add("Text",dsMusicStore, "Customers.LastName")<br />
txtFirstName.DataBindings.Add("Text", dsMusicStore, "Customers.firstName")


Code for the insert
Dim comBuilder As New OleDb.OleDbCommandBuilder(daCustomers)<br />
Dim dsNewRow As DataRow<br />
dsNewRow = dsMusicStore.Tables("customers").NewRow<br />
dsNewRow.Item("FirstName") = txtFirstName.Text<br />
dsNewRow.Item("LastName") = txtLastName.Text<br />
dsMusicStore.Tables("customers").Rows.Add(dsNewRow)<br />
daCustomers.Update(dsMusicStore, "customers")<br />
grdCustomers.Update()<br />
Me.Refresh()


Problems:
1. When I start entering data into the textbox, the data overwrites data in the top line of the grid
2. When I save, the data in the first line is still overwritten and the new record falls to the bottom of the grid. If I close the form and reopen it, the data first line data has been restored and the new data takes its place on the grid in the proper position for the given index
How can I:
1. stop the first line on the grid from being overwrttien (short of unbinding the data
2. Update the data grid upon save so the record displays where it should (not at the bottom)



Just Do It

QuestionGet FullPath Pin
georgegarvasis15-Nov-07 0:20
georgegarvasis15-Nov-07 0:20 
AnswerRe: Get FullPath Pin
nishkarsh_k15-Nov-07 3:47
nishkarsh_k15-Nov-07 3:47 
QuestionHelp on Using Resources in VB.NET Pin
Dan Suthar15-Nov-07 0:08
professionalDan Suthar15-Nov-07 0:08 
Questionprinting problem using crystal report [modified] Pin
sathyan_829414-Nov-07 21:44
sathyan_829414-Nov-07 21:44 
Questionhow to entry in data grid view Pin
warwarphoo14-Nov-07 21:32
warwarphoo14-Nov-07 21:32 
AnswerRe: how to entry in data grid view Pin
John_Adams15-Nov-07 11:43
John_Adams15-Nov-07 11:43 
GeneralRe: how to entry in data grid view Pin
warwarphoo15-Nov-07 17:46
warwarphoo15-Nov-07 17:46 
QuestionDataGrid_Navigate Event Pin
ejaz_pk14-Nov-07 20:31
ejaz_pk14-Nov-07 20:31 
QuestionDatagridView Pin
VB 8.014-Nov-07 20:26
VB 8.014-Nov-07 20:26 
AnswerRe: DatagridView Pin
nishkarsh_k14-Nov-07 20:50
nishkarsh_k14-Nov-07 20:50 
GeneralRe: DatagridView Pin
VB 8.014-Nov-07 22:04
VB 8.014-Nov-07 22:04 
GeneralRe: DatagridView Pin
nishkarsh_k15-Nov-07 3:53
nishkarsh_k15-Nov-07 3:53 
QuestionRead selected data from DataGrid Pin
nishkarsh_k14-Nov-07 20:00
nishkarsh_k14-Nov-07 20:00 
AnswerRe: Read selected data from DataGrid Pin
Paul Conrad28-Nov-07 15:18
professionalPaul Conrad28-Nov-07 15:18 
GeneralRe: Read selected data from DataGrid Pin
nishkarsh_k1-Dec-07 8:39
nishkarsh_k1-Dec-07 8:39 
GeneralRe: Read selected data from DataGrid Pin
Paul Conrad1-Dec-07 8:47
professionalPaul Conrad1-Dec-07 8:47 
QuestionConcurency in vb.net and ado.net Pin
Vimalsoft(Pty) Ltd14-Nov-07 19:25
professionalVimalsoft(Pty) Ltd14-Nov-07 19:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.