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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Non rendered Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

118446 Mar 9,2015 02:59 PM UTC Mar 10,2015 01:04 PM UTC ASP.NET MVC 1
loading
Tags: Grid
Gonzalo
Asked On March 9, 2015 02:59 PM UTC

I'm rendering a grid with:

@(Html.EJ().Grid<Solicitud>("FlatGrid")
    .Datasource(new List<Solicitud>
    {
        new Solicitud
        {
            EAN="EAN",
            Estado="Estado",
            Solicitante = "Solicitante"
        }
    }.AsEnumerable())
 
    .AllowSorting()
    .AllowPaging()
    .Columns(col =>
    {
        col.Field("Estado").HeaderText("Estado").Add();
        col.Field("EAN").HeaderText("Código de barras").Add();
        col.Field("Solicitante").HeaderText("Solicitante").Add();
    }))
But I only get a <div id="FlatGrid"></div> on my html...

I'm missing something?


Gowthami V [Syncfusion]
Replied On March 10, 2015 01:04 PM UTC

Hi Gonzalo,

Thanks for using syncfusion’s product.

We have anlyzed your code snippet and we suspect that you may missed to provide the @(Html.EJ().ScriptManager())  in the Layout page and hence the “div” element alone is created.

For your kind information, the ASP.Net MVC Controls will render in two mode, they are

1. Unobtrusive mode.

2. Non-unobtrusive mode.

Unobtrusive Mode

The ASP.Net MVC Controls will render in Unobtrusive mode when setting the “UnobtrusiveJavascriptEnabled” as true in web.config file.

[webConfig]

<appSettings>

    . . . .

    <add key="UnobtrusiveJavaScriptEnabled" value="true" />

  </appSettings>

When UnobtrusiveJavaScriptEnabled is set as true, then we  have to refer the “ej.unobtrusive.min.js” in the Layout page.

[Layout.vbhtml]

    <script src="@Url.Content("~/Scripts/ej/ej.web.all.min.js")" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/ej/ej.unobtrusive.min.js")" type="text/javascript"></script>

Non-unobtrusive Mode

The ASP.Net MVC Controls will render in Non-unobtrusive mode when setting the “UnobtrusiveJavascriptEnabled” as false in web.config file and also need to include the@(Html.EJ().ScriptManager())  in the Layout page.

[webconfig]

<appSettings>

    . . . .

    <add key="UnobtrusiveJavaScriptEnabled" value="false" />

  </appSettings>

When UnobtrusiveJavaScriptEnabled is set as false, then we  have to include the@(Html.EJ().ScriptManager())   in the Layout page as belows

[Layout.vbhtml]

<script src="@Url.Content("~/Scripts/ej/ej.web.all.min.js")" type="text/javascript"></script>

  . . . . . .

@(Html.EJ().ScriptManager())  

For your convenience, we have created a simple grid sample in Asp.net MVC and the same can be downloaded from the below location.

Sample Loction: http://www.syncfusion.com/downloads/support/directtrac/general/example480283158.zip


Please let us know if you have any other concerns.

Regards,
Gowthami V.



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.

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

;