I'm currently trying to use RadControls in my Sharepoint WebPart. One of it is the ComboBox control.
I wanted to know, how I can bind my ComboBox with multiple columns to a SPDataSource.
I already accomplished to bind the first comlumn, but I don't know how to bind the others.
First I have my HeaderTemplate here:
Class HeaderTemplate
Implements ITemplate
Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
Dim table As New HtmlTable()
Dim row As New HtmlTableRow()
Dim cell As New HtmlTableCell()
table.Width = "100%"
cell.InnerHtml = "<font size='1pt'><b>Projekt Nr.</b></font>"
cell.Width = "30%"
row.Controls.Add(cell)
Dim cell1 As New HtmlTableCell()
cell1.InnerHtml = "<font size='1pt'><b>Projekt Name</b></font>"
cell1.Width = "70%"
row.Controls.Add(cell1)
table.Controls.Add(row)
container.Controls.Add(table)
End Sub
End Class
And here I bind data:
Dim ds As New SPDataSource
ds.DataSourceMode = SPDataSourceMode.List
ds.List = web.Lists("Projekte")
ds.UseInternalName = True
projekt = New RadComboBox
projekt.ID = "cmb_projekt"
projekt.Width = 300
projekt.Skin = "WebBlue"
projekt.HeaderTemplate = New HeaderTemplate()
projekt.DataSource = ds
projekt.DataTextField = "Nr"
projekt.DataBind()
Thanks for all replies.
Best regards,
Mark