We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ListBox Databound vb.net question

I am trying to to use the orubase listbox control in razor.  I have a list(of dc.calendar), a custom list, that I want to bind the listbox to.

I believe my controller is fine with CalendarController.vb having 
    <HttpGet> _
    Public Function List() As ActionResult
        Dim lst As New List(Of dcBase.Calendar)
        Dim fact As New dcBase.CalendarFactory
        lst = fact.Load(288)
        Return View(lst)
    End Function

However, I can't figure out how the vb/razor code should look to use the Views/Calendar/List.vbhtml
The html.orubase.listbox is a shared control so I can't do an old fashioned 
"for each item in Model" correct?  I am interested in doing a multi-line listbox as is demonstrated in your UserGuide under "ListBox" in the Template section.

Most of the UI controls I have worked with in the past have don't have everything being done in a single line of code with .function().function1().function2 like your examples so it looks a bit daunting and confusing for my first MVC project.

I would be grateful for any help.
Shawn

1 Reply

AV Aravindan V Syncfusion Team November 12, 2013 11:31 AM UTC

Hi,
  We have created a simple sample with custom list data binding in VB razor.
We have already having the below predefined classes specifically to use in template for multi-line list box. You can also make use of this or else you can write your own styles in sample level as per your requirement. Please refer the sample in the below attachment.

S.No

ClassName

Description

1

sf-lb-title

For title based template

2

sf-lb-subject

For subject based template

3

sf-lb-desc

For description based template

4

sf-lb-time

For time based template

Please try this and let us know if you have any queries.

Regards,
Aravindan V



Listbox_Feature_f241e804.zip

Loader.
Live Chat Icon For mobile
Up arrow icon