DataGridViewCombobox- How to get the data selected in edit mode?

Last post 06-07-2008, 4:44 AM by VISHWANATH. 0 replies.
Sort Posts: Previous Next
  •  06-07-2008, 4:44 AM Post number 59102

    DataGridViewCombobox- How to get the data selected in edit mode?

    Hi,

       I am new to Windows Application (.NET 2.0), I am working on a DataGridView(DGV) where one of the column is a DataGridViewComboBox(DGVC). I have captured the selected value of the DGVC to a temporary tabel, for the design of the XML.

      Now when I want to retrive data from the temperary tabel to DataGridView,it throws an error. I could not get the selected value DGVC,( some thing like xxx.selectedvalue="yyy" in DataGrid .NET 1.0/.NET 1.1)

    I have tried this code for each row in the DGVC, where DT1 is a the temporary tabel

    DGV.Rows(x).Cells("CBOXLABELDESC").Value = trim(DT1.Rows(i).Item("Description"))

     but this code throws an error:

    System.ArgumentException:DataGridViewComboBoxCell value is not valid.

     

View as RSS news feed in XML