P
Patrick Sullivan
I had this working last Friday, but another field had probelms that I was
going to fix today. Wrong values are being put into comboboxes, or rather,
since I am using a keyword from a datagrid table to lookup a correspondin
value in the combobox, that does not exist in the wrong combobox's list,
nothing appears. Ie. it's suppsed to look up "position" first but it returns
"company" first.
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnEdit.Click
Dim index As Integer
Dim cellValue As String
' get typed dataset selected value to "cellValue". This should return should
be the
' POSITION data
cellValue = dgAppsView.Item(dgAppsView.CurrentRowIndex,
appsViewData.appsvw.PositionColumn.Ordinal).ToString
' here's where the combobox does its lookup
index = cboPosition.FindString(cellValue)
cmbPosition.SelectedIndex = index
cellValue = dgAppsView.Item(dgAppsView.CurrentRowIndex,
appsViewData.appsvw.CompanyColumn.Ordinal).ToString
index = cmbCompanies.FindString(cellValue)
cmbCompanies.SelectedIndex = index
cellValue = dgAppsView.Item(dgAppsView.CurrentRowIndex,
appsViewData.appsvw.methodColumn.Ordinal).ToString
index = cmbMethod.FindString(cellValue)
cmbMethod.SelectedIndex = index
DisableControls(False)
End Sub
I have deleted and redone the dataset, made sure my tablemappings are right
(after all it was working last week) and changed the order of the loads, but
nothing makes any difference. where should I look for an answer? TIA
going to fix today. Wrong values are being put into comboboxes, or rather,
since I am using a keyword from a datagrid table to lookup a correspondin
value in the combobox, that does not exist in the wrong combobox's list,
nothing appears. Ie. it's suppsed to look up "position" first but it returns
"company" first.
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnEdit.Click
Dim index As Integer
Dim cellValue As String
' get typed dataset selected value to "cellValue". This should return should
be the
' POSITION data
cellValue = dgAppsView.Item(dgAppsView.CurrentRowIndex,
appsViewData.appsvw.PositionColumn.Ordinal).ToString
' here's where the combobox does its lookup
index = cboPosition.FindString(cellValue)
cmbPosition.SelectedIndex = index
cellValue = dgAppsView.Item(dgAppsView.CurrentRowIndex,
appsViewData.appsvw.CompanyColumn.Ordinal).ToString
index = cmbCompanies.FindString(cellValue)
cmbCompanies.SelectedIndex = index
cellValue = dgAppsView.Item(dgAppsView.CurrentRowIndex,
appsViewData.appsvw.methodColumn.Ordinal).ToString
index = cmbMethod.FindString(cellValue)
cmbMethod.SelectedIndex = index
DisableControls(False)
End Sub
I have deleted and redone the dataset, made sure my tablemappings are right
(after all it was working last week) and changed the order of the loads, but
nothing makes any difference. where should I look for an answer? TIA