Parameter is not valid.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abduljalil
    New Member
    • May 2015
    • 3

    Parameter is not valid.

    Code:
    FRM_ADD_PRODUCT frm = new FRM_ADD_PRODUCT();
                frm.txtRef.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                frm.txtDesc.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                frm.textQte.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                frm.txtPrice.Text = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
                frm.cmbCat.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
                frm.Text = "تحديث المنتجات:" + this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                frm.btnAdd.Text = "تحديث :";
                frm.state = "update";
                frm.txtRef.ReadOnly = true;
                byte[] image = (byte[])prd.GET_IMAGE_PRODUCTS(this.dataGridView1.CurrentRow.Cells[0].Value.ToString()).Rows[0][0];
                MemoryStream ms = new MemoryStream(image);
                frm.Pbox.Image = Image.FromStream(ms);//here is the error 
                frm.ShowDialog();
    Attached Files
  • abduljalil
    New Member
    • May 2015
    • 3

    #2
    please i need help it's it is an urgent matter

    Comment

    • Luuk
      Recognized Expert Top Contributor
      • Mar 2012
      • 1043

      #3
      Yes, urgent, as in need an answer now......

      But what is this piece of code supposed to do?
      What is 'Image', it's not clear from this context.

      You could surround the code with a try{} block, and catch the exception.....

      Comment

      • abduljalil
        New Member
        • May 2015
        • 3

        #4
        dear luuk
        this code help me when there is product need to update or edit i have get the picture of the product

        Comment

        Working...