Hello Everyone,

I'm still new at programming, and im having problems with the project i was assign, so im supposed to make like a retail store POS, where i look for the articule and add how much did they take and the price.

SORRY IF ITS IN SPANISH

So this is the main window is attached to this post [TEX]MAIN.JPG[/TEX], so my main problem is that im supposed to copy all the info from the top combobox and textboxes to the datagrid

and so the first item it does enter it ok(well thats what i think) and when i try to enter the second item it just refresh the first item


So what im expecting is that the datagrid makes several entries so that after that i can transfer all of that to a database registering the sale.

So this is the code of the button that inserts the article to the datagrid

Private Sub ACEPTAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ACEPTAR.Click
        TEST1.Text = "Aceptada"
        Dim imp As Integer
        imp = CANT.Text * PRECIO.Text

        Ventas.Rows(c).Cells(0).Value = My.Settings.folio + 1
        Ventas.Rows(c).Cells(1).Value = fecha.Text
        Ventas.Rows(c).Cells(2).Value = "V"
        Ventas.Rows(c).Cells(3).Value = ComboBox1.Text
        Ventas.Rows(c).Cells(4).Value = ComboBox2.Text
        Ventas.Rows(c).Cells(5).Value = CANT.Text
        Ventas.Rows(c).Cells(6).Value = PRECIO.Text
        Ventas.Rows(c).Cells(7).Value = imp
        Ventas.Rows(c).Cells(8).Value = ComboBox3.Text
        c += 1



    End Sub


I know i suck at this but i dont know where else to turn to, can anyone please guide me on what to do or what to try so that i can continue with my project

use something like this:

Private Sub ACEPTAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ACEPTAR.Click

        TEST1.Text = "Aceptada"

        Dim imp As Integer

        imp = CANT.Text * PRECIO.Text

        Ventas.Rows.Add(My.Settings.folio + 1, fecha.Text, Ventas.Rows(c).Cells(2).Value = "V", ComboBox1.Text, ComboBox2.Text, CANT.Text, PRECIO.Text, PRECIO.Text, imp, ComboBox3.Text)
        
    End Sub

wat i am saying is use the: datagridview.rows.add Method

actually it did work perfectly!!!

thanks a million!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.