Click here to Skip to main content
15,898,942 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: treeview in vb.net Pin
Tom Deketelaere19-Dec-07 1:17
professionalTom Deketelaere19-Dec-07 1:17 
GeneralRe: treeview in vb.net Pin
Paul Conrad19-Dec-07 16:33
professionalPaul Conrad19-Dec-07 16:33 
GeneralRe: treeview in vb.net Pin
ChandraRam20-Dec-07 1:30
ChandraRam20-Dec-07 1:30 
QuestionHow to put a Label or picture Box on MDI form Pin
SekharOne18-Dec-07 23:25
SekharOne18-Dec-07 23:25 
AnswerRe: How to put a Label or picture Box on MDI form Pin
CKnig18-Dec-07 23:34
CKnig18-Dec-07 23:34 
GeneralRe: How to put a Label or picture Box on MDI form Pin
SekharOne19-Dec-07 1:33
SekharOne19-Dec-07 1:33 
GeneralRe: How to put a Label or picture Box on MDI form Pin
CKnig19-Dec-07 1:37
CKnig19-Dec-07 1:37 
QuestionHow can I add multiple new row into datagrid ? Pin
Eunice (VB junior)18-Dec-07 22:42
Eunice (VB junior)18-Dec-07 22:42 
Hi everyone ,
I'm using vb.net 2003 (window application).
I have 2 textbox and want to add these 2 text into datagrid. But when i click "Add" Button for the 1st time, no problem. But after i click the 2 times, it replaced with the 1st row. But what i want is to add them into 2nd or subsequent rows depending on how many times i click 'Add' button.The 1st row remain.
Here i attach with my codes. I hope someone can hint me where is my mistake.
Thanks in advanced.

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd3.Click
Dim Table1 As DataTable
Table1 = New DataTable("LotNumber")
Dim Row As DataRow

Try
Dim HBarCode As DataColumn = New DataColumn("HBarCode")
HBarCode.DataType = System.Type.GetType("System.String")
Table1.Columns.Add(HBarCode)

Dim EMIBarCode As DataColumn = New DataColumn("EMIBarCode")
EMIBarCode.DataType = System.Type.GetType("System.String")
Table1.Columns.Add(EMIBarCode)

Row = Table1.NewRow()
Row.Item("HBarCode") = Me.txtHBarCode.Text
Row.Item("EMIBarCode") = Me.txtEMIBarCode.Text
Table1.Rows.Add(Row)

Catch ex As Exception
MessageBox.Show(ex.Message)
End Try


Dim ds As New DataSet
ds = New DataSet
ds.Tables.Add(Table1)
dgResult.SetDataBinding(ds, "LotNumber")
End Sub
thanks, eunice
AnswerRe: How can I add multiple new row into datagrid ? Pin
CKnig18-Dec-07 23:31
CKnig18-Dec-07 23:31 
GeneralRe: How can I add multiple new row into datagrid ? Pin
Eunice (VB junior)20-Dec-07 13:33
Eunice (VB junior)20-Dec-07 13:33 
GeneralRe: How can I add multiple new row into datagrid ? Pin
Eunice (VB junior)25-Dec-07 20:11
Eunice (VB junior)25-Dec-07 20:11 
Generalparameter search Pin
BOREC18-Dec-07 22:37
BOREC18-Dec-07 22:37 
GeneralRe: parameter search Pin
CKnig18-Dec-07 23:36
CKnig18-Dec-07 23:36 
GeneralRe: parameter search Pin
Christian Graus18-Dec-07 23:36
protectorChristian Graus18-Dec-07 23:36 
Generalsecurity issue Pin
Tauseef A18-Dec-07 22:31
Tauseef A18-Dec-07 22:31 
GeneralRe: security issue Pin
CKnig18-Dec-07 23:39
CKnig18-Dec-07 23:39 
QuestionDo i need a close at the end of this code??? Pin
Support12318-Dec-07 22:19
Support12318-Dec-07 22:19 
GeneralRe: Do i need a close at the end of this code??? Pin
Dave Kreskowiak19-Dec-07 4:06
mveDave Kreskowiak19-Dec-07 4:06 
GeneralRe: Do i need a close at the end of this code??? Pin
Support12320-Dec-07 4:15
Support12320-Dec-07 4:15 
GeneralWeb Browser control on .net compact framework 2.0 Pin
Benny_Lava18-Dec-07 20:23
Benny_Lava18-Dec-07 20:23 
GeneralRe: Web Browser control on .net compact framework 2.0 Pin
Dave Kreskowiak19-Dec-07 4:09
mveDave Kreskowiak19-Dec-07 4:09 
GeneralHelp: Pin
angelo0718-Dec-07 20:07
angelo0718-Dec-07 20:07 
GeneralRe: Help: Pin
Christian Graus18-Dec-07 20:13
protectorChristian Graus18-Dec-07 20:13 
GeneralRe: Help: Pin
Vasudevan Deepak Kumar19-Dec-07 3:45
Vasudevan Deepak Kumar19-Dec-07 3:45 
GeneralRe: Help: Pin
Vasudevan Deepak Kumar19-Dec-07 3:43
Vasudevan Deepak Kumar19-Dec-07 3:43 

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.