Combining data source and manual entries

1 reply. Last post: January 27, 2010 12:27 AM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Ellen Member

Hi, I need to populate a webcombo using data source plus several manual entries. I cannot make both of them work: either manual entries are displayed or database entries, but not both.

How to display both types of data?

1. This is my code for using data source:

Private Sub wcboReportTechnique_InitializeDataSource(ByVal sender As Object, ByVal e As ISNet.WebUI.WebCombo.DataSourceEventArgs) Handles wcboReportTechnique.InitializeDataSource
Dim connStr As String = Application("ConnectionStringR").ToString()
Dim cbo As New ComboBoxes
e.DataSource = cbo.Technique(connStr)
wcboReportTechnique.DataTextField = "Description"
wcboReportTechnique.DataValueField = "TechniqueID"
End Sub

2. This is a code for manual entries:

Dim wc As WebCombo = wcboReportTechnique
Dim column As New WebComboColumn
Dim row As New WebComboRow
Dim cell As New WebComboCell
cell.Text = "Any for Technique"
cell.Value = "-1"
wc.Columns.Add(column)
wc.Rows.Add(row)
row.Cells.Add(cell)

Thanks, Ellen



All times are GMT -5. The time now is 6:43 PM.
Previous Next