asp.net mvc - Can you give me some examples on using telerik without using kendo? -


i know subjective question , closed desperate times lead desperate measures. tried searching examples of telerik hours not find simple program understand. new mvc , haven't worked on telerik. have create user table using sql server , display user tables in grid. part have done. want create, edit , delete on rows using pop dialog box , should have validations. kind of this example. of have created grid , coding follows:

user.cs

namespace mvctelerikgrid.models {     using system;     using system.collections.generic;      public partial class user     {         public int userid { get; set; }         public string firstname { get; set; }         public string lastname { get; set; }         public string address { get; set; }         public string city { get; set; }         public string email { get; set; }         public string phoneno { get; set; }     } } 

homecontroller.cs

public class homecontroller : controller {     public actionresult index()     {         list<user> list = new list<user>();         using (detailsentities dc = new detailsentities())         {             list = dc.users.orderby(a => a.userid).tolist();         }         return view(list);     } } 

index.cshtml

@using telerik.web.mvc.ui; @model ienumerable<mvctelerikgrid.models.user>  @{     viewbag.title = "index"; }  @{     html.telerik().grid(model)     .name("grid")     .columns(columns =>     {         columns.bound(o => o.firstname).width(100);         columns.bound(o => o.lastname).width(100);         columns.bound(o => o.address).width(100);         columns.bound(o => o.city).width(100);         columns.bound(o => o.email).width(100);         columns.bound(o => o.phoneno).width(100);     })     .pageable(a => a.pagesize(2))     .sortable()     .filterable()     .groupable()     .render(); }  @(html.telerik().stylesheetregistrar().defaultgroup(group=> group.add("telerik.common.css").add("telerik.windows7.css").combined(true).compress(true))) @(html.telerik().scriptregistrar()) 

please me.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -