Hi Keith,
Greetings from Syncfusion.
Query : Can I have a sample source code for asp.net vb
We have analyzed your query and we have prepared a Syncfusion EJ2 Grid sample for your convenience. Please download the sample from the link below,
We have prepared the above sample by following the steps below,
1. Create a VB MVC sample.
2. Install the Syncfusion MVC package (Syncfusion.EJ2.MVC5) by using the NuGet. Please refer the screenshot below,
3. Now add the following scripts and styles CDN links and ScriptManager in the “_Layout.vbhtml” file.
@Imports Syncfusion.EJ2
<!DOCTYPE html>
<html>
<head>
...
<!-- Syncfusion Essential JS 2 Styles -->
<!-- Syncfusion Essential JS 2 Scripts -->
</head>
<body>
...
@Html.EJS().ScriptManager()
</body>
</html>
|
4. Add the “Syncfusion.EJ2” Assembly reference to the “Web.config” file.’
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
...
<add namespace="VBSample" />
<add namespace="Syncfusion.EJ2" />
</namespaces>
</pages> |
We have used the following code to set the DataSource to the Grid. Please refer the code example below,
[Index.vbhtml]
@Imports Syncfusion.EJ2
@Html.EJS().Grid("Grid").DataSource(Model).AllowPaging().Render()
[HomeController.vb]
Function Index() As ActionResult
BindDataSource()
Dim contracts = order
Return View(contracts.ToList())
End Function
|
Please get back to us for further assistance.
Regards,
Pavithra S.