This is a migrated thread and some comments may be shown as answers.

custom command

2 Answers 269 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 11 Jul 2012, 01:06 AM
Hi! Im new to kendo ui. Please help me on how to implement custom command in server editing... Thanks!

2 Answers, 1 is accepted

Sort by
0
Joel
Top achievements
Rank 1
answered on 11 Jul 2012, 06:27 AM
guys heres my code

@(Html.Kendo().Grid(Model)  //The grid will be bound to the Model which is the Products table
      .Name("BillingGrid") //The name of the grid is mandatory. It specifies the "id" attribute of the widget.
      .Columns(columns =>
      {
          columns.Bound(bh => bh.BillNo);
          columns.Bound(bh => bh.BillDate).Format("{0:d}");
          columns.Bound(bh => bh.BillSubCode);
           columns.Command(command => { command.Edit(); command.Destroy(); command.Custom("Details").Text("Show Details").Action("Details", "Billing"); }).Width(500);  
        
      }
      
    )
   
     .Pageable() //Enable paging
     .Sortable()
     .Scrollable()
     .Filterable()
     .DataSource(datasource => datasource

         .Server()
         .Model(bhid => bhid.Id(b => b.BillNo))
         .Read(read => read.Action("Index", "Billing"))
         .Update(update => update.Action("Update", "Home"))
         .Destroy(destroy => destroy.Action("Destroy", "Billing"))
        
       
    )
    )



I'm always getting this error

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Billing/Details


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1




Please help me on this....thanks!
0
Dennis
Top achievements
Rank 1
answered on 15 Jul 2012, 10:23 PM
Do you have a method in your controller named Details?

Thanks
Dennis
Tags
Grid
Asked by
Joel
Top achievements
Rank 1
Answers by
Joel
Top achievements
Rank 1
Dennis
Top achievements
Rank 1
Share this question
or