C#如何将数据从DatagridView发送到数据转发器

时间:2016-04-29 22:12:36

标签: c# datagridview datarepeater

我有一个带有datagridview和Data Repeater的表单。 双击datagrid视图中的一行我可以将值传递给textBox1,但我无法将值传递给数据中继器内的另一个文本框这里是我的代码,请查看表单图像以获取更好的信息。

private void dataGridView1_MouseDoubleClick(object sender, MouseEventArgs e)
    {
        DataGridViewRow dr = dataGridView1.SelectedRows[0];
        patient_ID_FKTextBox.Text = dr.Cells[0].Value.ToString(); //this is my issue unsuccessfull value pass
        textBox1.Text = dr.Cells[1].Value.ToString(); //Name 100% successfull value pass 
    }


private void Table_Load(object sender, EventArgs e)
    {
        // TODO: This line of code loads data into the 'physioDBDataSet1.AssessmentForm' table. You can move, or remove it, as needed.
        this.assessmentFormTableAdapter.Fill(this.physioDBDataSet1.AssessmentForm);
        // TODO: This line of code loads data into the 'physioDBDataSet.Table' table. You can move, or remove it, as needed.
        this.tableTableAdapter.Fill(this.physioDBDataSet.Table);
        // TODO: This line of code loads data into the 'physioDBDataSet.NeckMeasurments' table. You can move, or remove it, as needed.
        this.neckMeasurmentsTableAdapter.Fill(this.physioDBDataSet.NeckMeasurments);
        dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

    }

enter image description here

0 个答案:

没有答案