THIS IS MY CODE :
cmdSelect = New OleDbCommand(sql, conn) daSelect = New OleDbDataAdapter(cmdSelect) daSelect.Fill(dsCredit, "Credit") count = dsCredit.Tables(0).Rows.Count MsgBox(count) Try dgCredit.Rows(0).Cells(0).Value = dsCredit.Tables(0).Rows(0).Item(0).ToString dgCredit.Rows(0).Cells(1).Value = dsCredit.Tables(0).Rows(0).Item(1).ToString dgCredit.Rows(0).Cells(2).Value = dsCredit.Tables(0).Rows(0).Item(3).ToString dgCredit.Rows(0).Cells(3).Value = dsCredit.Tables(0).Rows(0).Item(4).ToString dgCredit.Rows(0).[color=#3333FF]Cells(4)[/color].Value = dsCredit.Tables(0).Rows(0).Item(5).ToString dgCredit.Rows(0).[color=#3333FF]Cells(5)[/color].Value = dsCredit.Tables(0).Rows(0).Item(6).ToString dgCredit.Rows(0).[color=#3333FF]Cells(6)[/color].Value = dsCredit.Tables(0).Rows(0).Item(7).ToString dgCredit.Rows(0).[color=#3333FF]Cells(7)[/color].Value = dsCredit.Tables(0).Rows(0).Item(8).ToString dgCredit.Rows(0).[color=#3333FF]Cells(8)[/color].Value = dsCredit.Tables(0).Rows(0).Item(9).ToString Catch ex As Exception err = ex.ToString MsgBox(err) End Try
END CODE:
my cell 4,5,6,7,8 are datagridview combo box cell.
ERROR I AM GETTING
System.ArgumentExcemption:DatagridviewComboBoxCell Value is not valid

New Topic/Question
Reply




MultiQuote





|