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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sample source code for asp.net vb

Thread ID:

Created:

Updated:

Platform:

Replies:

143604 Mar 28,2019 05:38 PM UTC Mar 29,2019 09:14 AM UTC ASP.NET Core - EJ 2 1
loading
Tags: DataGrid
Keith Yong
Asked On March 28, 2019 05:38 PM UTC

Can I have a sample source code for asp.net vb like below sample instead of asp.net core?

https://ej2.syncfusion.com/aspnetcore/Grid/DefaultFunctionalities#/material

Pavithra Subramaniyam [Syncfusion]
Replied On March 29, 2019 09:14 AM UTC

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 -->  
   <link rel="stylesheet" rel='nofollow' rel='nofollow' href="https://cdn.syncfusion.com/ej2/material.css"/>  
  
    <!-- Syncfusion Essential JS 2 Scripts -->  
    <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>  
</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. 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;