🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #1682

Problema con dataset (ASP.NET)

#1682
From: M
Date: Wed, 03 Mar 2004 21:17
22 lines
2384 bytes
Spiego rapidamente il mio problema.
Riempiendo delle textbox ho l'esigenza, cliccando su un pulsante, di
passarne il contenuto su di una nuova riga del dataset, o meglio del
datatable, e di visualizzare immediatamente il contenuto della tabella
in una griglia. Il problema � che dovrei ripetere l'operazione diverse
volte, ma quando tento di creare il secondo record quello che accade �
che mi viene modificato il primo, o almeno cos� vedo nella griglia.
Qualcuno � cos� gentile da aiutarmi a capire il perch� di tutto ci�?

Questo � il codice che ho scritto, dove sbaglio?

    Private Sub cmdInvia_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdInvia.Click
        If txtCodice.Text <> "" And txtQuantita.Text <> "" Then
            Dim dr As DataRow = dtOrdini.NewRow
            dr("Codice") = txtCodice.Text
            dr("qta") = CInt(txtQuantita.Text)
            dtOrdini.Rows.Add(dr)

            grdOrdini.DataSource = dsOrdini.Tables("dtOrdini")
            grdOrdini.DataBind()
        End If
Technical Details
Message-ID: <cric401f0llql09e98ca1rpmr3m9oo2mtf@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed3.easynews.com!easynews.com!easynews!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!news.giganews.com.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII
X-Google-Thread: f94ee,bc7720888ae96c17,start
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2004-03-03 13:17:59 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed3.easynews.com!easynews.com!easynews!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 03 Mar 2004 15:17:57 -0600
From: "M@rco" <wilanderTOGLI@MAIUSCOLOtin.it>
Newsgroups: free.it.visual-basic
Subject: Problema con dataset (ASP.NET)
Date: Wed, 03 Mar 2004 22:17:58 +0100
Message-ID: <cric401f0llql09e98ca1rpmr3m9oo2mtf@4ax.com>
X-Newsreader: Forte Agent 2.0/32.646
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Lines: 22
X-Trace: sv3-zLM097w/l50mjbRkClAm0vYvOI6cStKAOsnBh/nljWKdsrH/HXMeNe7TMpS9yRX9wpo2LN2d791JP7O!2lVNPqYoyYdS8k+x3steGAXhf4q+jKDFzcorB8vA/GhRdkccHYq5Y2O9FklXjsGEbcVwNQ==
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.1