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

Show the data correctly

Thread ID:





120847 Oct 21,2015 10:13 PM UTC Oct 22,2015 12:12 PM UTC ASP.NET MVC 1
Tags: Grid
Juan Lobos
Asked On October 21, 2015 10:13 PM UTC

Hi I have the following problem. I want to use the grid of Syncfusion Asp net MVC in my application, but not how to use it in this case, since my table has the following code that allows me to format the data and do not like the grid of Syncfusion. If you could help me on this issue I would appreciate it.

Here's my code, try to simplify it as I see conditional (if) that I formatted the data, as I can do so that I look like

@foreach (var item in Model)

@if (item.MedallionComplete == "Medallion")



@Html.DisplayFor(modelItem => item.ClienteId)

@Html.DisplayFor(modelItem => item.EstadoEquipo)

@Html.DisplayFor(modelItem => item.FechaIngresoEquipo)

@if (item.FechaDespacho == Convert.ToDateTime("01/01/0001"))

@Html.DisplayFor(modelItem => item.FechaDespacho)

@Html.DisplayFor(modelItem => item.EquipoId)


And this is my grid in Syncfusion, but I need to put those conditions to display data as I want.

Thanks for your understanding.

.PageSettings(page => { page.PageSize(20); })
.Columns(c =>
c.Field("InformeId").HeaderText("N° OT").Add();
c.Field("EstadoEquipo").HeaderText("Estado Equipo").Add();
c.Field("FechaIngresoEquipo").HeaderText("Ingreso Equipo").Add();
c.Field("FechaDespacho").HeaderText("Despacho Equipo").Format("{0:dd/MM/yyyy}").Add();
c.Field("Serie").HeaderText("N° Serie").Add();
c.Field("OrdenCompra").HeaderText("Orden de Compra").Add();
c.Field("OrdenDespacho").HeaderText("Guía Despacho").Add();
c.Field("GuiaIngreso").HeaderText("Guía Ingreso").Add();
c.Field("TipoReparacion").HeaderText("Tipo Reparación").Add();

Saravanan Arunachalam [Syncfusion]
Replied On October 22, 2015 12:12 PM UTC

Hi Juan,

Thanks for contacting Syncfusion Support.

We have created the sample for your requirement and download it from the below link:


In the above sample, we used “Table” binding feature of Grid control and passed the formatted data table id to the DataSource “Table” property and the grid is rendered based on the specified formatted data. Please refer to the following code example and online sample for table binding.

<script id="_table1" type="text/template">


        . . .

        //Code for Data format




        .Datasource(ds => { ds.Table("#_table1"); })

        . . .





Saravanan A.


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