This is a migrated thread and some comments may be shown as answers.

Treeview examples in VB

2 Answers 129 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
David Waller
Top achievements
Rank 1
David Waller asked on 30 Dec 2012, 11:05 PM
Are there any VB examples available for Treeview. I've been trying for hours to get even a simple Treeview populated but I've been getting nowhere.

2 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 31 Dec 2012, 02:34 PM
Hi David,

We do not have VB examples - I could suggest you to use some converter to translate the expression without the special symbols @() for Razor and <%= %> for ASPX and then append them manually inside of your view.

For convenience here is one snippet in VB which could give you the idea how to construct the fluent configuration.

Grid within TabStrip

@ModelType IEnumerable(Of VBRazor.CustomEvent)                                
 
<h2>@ViewData("Message")</h2>
 
@Code
    Html.Telerik().TabStrip().Name("AdminDashboard") _
        .Items(Function(tabstrip)
                       tabstrip.Add().Text("All Events") _
                       .Content(Sub()
                                        Html.Telerik().Grid(Of VBRazor.CustomEvent)(Model).Name("Events") _
                                            .DataKeys(Function(datakey) datakey.Add(Function(i) i.ID)) _
                                            .Columns(Sub(column)
                                                             column.Bound(Function(i) i.DateTime).Title("Date Created").Format("{0:d}")
                                                             column.Bound(Function(i) i.ID)
                                                     End Sub) _
                                            .Pageable() _
                                            .Sortable(Function(sorting) sorting.OrderBy(Sub(order) order.Add(Function(i) i.DateTime).Descending())) _
                                            .Filterable(Function(filtering) filtering.Filters(Function(filter) filter.Add(Function(o) o.DateTime).IsGreaterThan(Date.Today.AddMonths(-3)))) _
                                            .Render()
                     
                                End Sub)
               End Function) _
        .SelectedIndex(Convert.ToInt32(0)).Render()
End Code


Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Nathan
Top achievements
Rank 2
answered on 02 Apr 2013, 09:00 AM
Do we have any actual examples yet?

Specifically, examples of how to bind to a dataset would be ideal.

It seems like pretty basic functionality?
Tags
TreeView
Asked by
David Waller
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Nathan
Top achievements
Rank 2
Share this question
or