how to enter dataset value into the combobox as Selected Text
-
Hello all, I'm working on some Desktop based Project in VB.Net in which I have made a page (say UpdateData.aspx) to update the employeeDetails.In that page, There is a DataGridView that displays all the detials. So, I'm using the cell_click event of the gridview. So, When I click on the gridview row, it retrieves all the records which are then populated into respective fields, except into 3 combobox fields. I don't know what to do with them to enter some particular value into those comboboxes as those also contain some datasource. And My code is like the following: ds = obj.GetDetails(objBo) If ds.Tables(0).Rows.Count>0 Then comboItemName.SelectedText = ds.Tables(0).Rows(0)("itemName") comboItemSerialNo.SelectedText = ds.Tables(0).Rows(0)("SerialNo") END please help... Thanks in advance
-
Hello all, I'm working on some Desktop based Project in VB.Net in which I have made a page (say UpdateData.aspx) to update the employeeDetails.In that page, There is a DataGridView that displays all the detials. So, I'm using the cell_click event of the gridview. So, When I click on the gridview row, it retrieves all the records which are then populated into respective fields, except into 3 combobox fields. I don't know what to do with them to enter some particular value into those comboboxes as those also contain some datasource. And My code is like the following: ds = obj.GetDetails(objBo) If ds.Tables(0).Rows.Count>0 Then comboItemName.SelectedText = ds.Tables(0).Rows(0)("itemName") comboItemSerialNo.SelectedText = ds.Tables(0).Rows(0)("SerialNo") END please help... Thanks in advance
vinci007 wrote: some Desktop based Project I assume this was a typo. Provided that you have setup the data source for the comboboxes in the template (if using them), and the selected text matches the valid entries, the display should be correct. You may also need to provide the selectedvalue properties though. What is the error/problem? Shreekar
-
vinci007 wrote: some Desktop based Project I assume this was a typo. Provided that you have setup the data source for the comboboxes in the template (if using them), and the selected text matches the valid entries, the display should be correct. You may also need to provide the selectedvalue properties though. What is the error/problem? Shreekar
Yeah, there are valid datasource in the combobox. The problem is that the value is not shown in the "comboItem" combobox for editing... in other words , combobox doesn't get value on edit... what could be the error...
-
Yeah, there are valid datasource in the combobox. The problem is that the value is not shown in the "comboItem" combobox for editing... in other words , combobox doesn't get value on edit... what could be the error...