Saqib Malick

Saqib Malick

  • NA
  • 23
  • 0

How to remove this error "GridViewCombBox value is not valid" in DetailGridViewComboBox

Jan 23 2010 12:29 AM

I have a MasterDetail Form where in detail is a datagridview. In Master Form a comboBox of class_IDComboBox

On the other side in Detail Gridview a comboBox of StudentName, which fill by and GetBy a class_IDComboBox.ValueMember on Form Load, and Navigation Move Next or Previous,

 

I bind the combo Box of datagridview and it is working fine on Load Form, becuase on Load I put this code in last line.

 

int cb1 = Convert.ToInt32(class_IDComboBox.SelectedValue );
this.table_Student_InformationTableAdapter.FillBy(this.dataSet_View_Student_Name.Table_Student_Information, cb1);

While that, when I cllick on Move Next  button ," DataGridview ComboBox value is not valid " error is occured.

I put this code in MoveNext button click event, becuase when I will move the record the GridviewCmboBoxVlaue will be the Database value.

int cb1 = Convert.ToInt32(class_IDComboBox.SelectedValue );

this.table_Student_InformationTableAdapter.FillBy(this.dataSet_View_Student_Name.Table_Student_Information, cb1);

 

How to remove this error "GridViewCombBox value is not valid" in DetailGridViewComboBox


Answers (1)