Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Define grid in MVC controller

$
0
0

Is it possible to define the grid attributes/properties in the MVC controller rather than the view to simplify the view at all?  I am currently evaluating Kendo before deciding whether or not to migrate from Infragistics IgniteUI.  

Infragistics IgniteUI igGrid allows you to define a GridModel (their object type) instance in your controller and pass it to the View which allows a much simpler bit of syntax in the view similar to:

Controller code:

    Public Function IGGridModel() As Infragistics.Web.Mvc.GridModel

        Dim grdModel As GridModel = New Infragistics.Web.Mvc.GridModel.GridModel()

        With grdModel
             . ID = ....

            .columns ....

             etc, etc

         End With

         Return grdModel

    End Function

 

View Code:

   <div ....  whatever>

        @Html.Infragistics().Grid(Model.IGGridModel)
  </div>

 

 


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>