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

MVC3 + Grid + Razor + VB.Net?

2 Answers 227 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 14 Nov 2012, 05:35 PM
Are there any working examples on implementing the Kendo Grid with the above criteria?

I've tried using converted C# examples but none of them seem to work. I'm just trying to work around the Northwind database as my experimental data source.

It's very, very hard to do a proper evaluation of a product without any documentation for a "supported" language.

2 Answers, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 14 Nov 2012, 06:38 PM
I finally figured it out. I was going to attach an example but it appears to be too large a file for the forum's limits. A copy and paste of the markup text will have to do.

@Modeltype IEnumerable(Of KendoUIMvcApplication2.ViewModels.ProductViewModel)
 
@Code
    ViewData("Title") = "Home Page"
End Code
 
<h2>@ViewData("Message")</h2>
<br />
@(Html.Kendo.Grid(Model).Name("Grid") _
    .Groupable() _
    .Pageable() _
    .Sortable() _
    .Scrollable() _
    .Filterable() _
    .Columns(Sub(columns)
                     columns.Bound(Function(p) p.ProductID).Groupable(False)
                     columns.Bound(Function(p) p.ProductName)
                     columns.Bound(Function(p) p.UnitPrice)
                     columns.Bound(Function(p) p.UnitsInStock)
             End Sub) _
    .DataSource(Function(dataSource)
                        dataSource.Ajax().Read(Function(read) read.Action("Products_Read", "Grid"))
                End Function))


0
Andy
Top achievements
Rank 1
answered on 30 Apr 2015, 01:25 AM

Thank you Greg for posting a follow up to your own question.

It is very hard to find examples in .vbhtml (even 3 years later)

Tags
Grid
Asked by
Greg
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
Andy
Top achievements
Rank 1
Share this question
or