Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to add new row after filling all textboxes, not replace old row in gridview?
    primarykey
    data
    text
    <p>i wrote program in vb.net. in my page, i have 3 textbox. in Txt_CardBarcode_TextChanged ,i wrote this codes:</p> <pre><code> Try Dim stream_CardBarcode As System.IO.MemoryStream = New System.IO.MemoryStream Dim cls As New Cls_Barcode Dim pic_CardBarcode As System.Drawing.Image = Nothing cls.btnEncode(pic_CardBarcode, Txt_CardBarcode.Text.Trim) pic_CardBarcode.Save(stream_CardBarcode, System.Drawing.Imaging.ImageFormat.Png) Dim f_cardBarcode As IO.FileStream = _ New IO.FileStream("C:\fafa.png", IO.FileMode.Create, IO.FileAccess.ReadWrite) Dim b_cardBarcode As Byte() = stream_CardBarcode.ToArray f_cardBarcode.Write(b_cardBarcode, 0, b_cardBarcode.Length) f_cardBarcode.Close() Dim ds As DS_Test ds = New DS_Test Dim Val_LabelBarcode() = {stream_CardBarcode.ToArray, Txt_ICCID.Text.Trim} ds.Tables(2).Rows.Add(Val_LabelBarcode) crp_CardBarcode.SetDataSource(ds.Tables(2)) Dim frm_CrpCardBarcode As New Frm_RepCardBarcode frm_CrpCardBarcode.CrystalReportViewer1.ReportSource = crp_CardBarcode GVSimInfo.DataSource = ds.Tables(2) ds.Tables(2).Rows.Add(1) GVSimInfo.Rows(GVSimInfo.Rows.Count - 1).Cells(0).Value = True ds.Tables(2).Rows(0).Item(0) = True ds.Tables(2).Rows(0).Item(1) = "" ds.Tables(2).Rows(0).Item(2) = Txt_ICCID.Text ds.Tables(2).Rows(0).Item(3) = "" ds.Tables(2).Rows(0).Item(4) = "" </code></pre> <p>now, in run time, after filling 3textbox, new row add to gridview , but when user want to more than filling textboxes, new row in grid view replace on old row!!! how to set new row add to grid view , instead of replace old row?</p> <p>in my dataset, i put 3tables. tables(2) has 2 columns that save image barcode with byte array data type, but in my gridview ,i have 5 columns. in run time give me error dialog,it is images from it: <img src="https://i.stack.imgur.com/EvgLj.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload