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

[Solved] Grid actions are not being invoked properly.

0 Answers 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kapil Koli
Top achievements
Rank 1
Kapil Koli asked on 12 Mar 2010, 08:24 AM
HI,
    The problem i am facing is - none of my grid action is getting invoked except select.
    Whatever I click my select actiomethod get invoked?
    Whay may be the reason?

    Part of my app is as follows -
    
    Grid - 
        

<%Html.Telerik().Grid(Model.Role.RolesInfo)
    .Name("Grid")
    .Toolbar(commands => commands.Insert())
    .DataKeys(keys => keys.Add(c => c.RoleID))
    .DataBinding(dataBinding => dataBinding
      .Server()
        .Select("SelectRole", "Administration")
        .Insert("InsertRole", "Administration")
        .Update("SaveRole", "Administration")
        .Delete("DeleteRole", "Administration")
    )
    .Columns(
    columns =>
      {       

        columns.Add(o => o.RoleName) .Title("Role Name") .Width("30%");

        columns.Add(o => o.Description) .Title("Description") .Width("50%");

        columns.Add(o => o.IsStatusEnabled)
          .Template(o =>
          {  %><%if (o.IsStatusEnabled) {%> Enabled<%}
              else{%>Disabled<%}%>  <%}) .Title("Status") .Width("8%");
        columns.Command(commands =>
        {commands.Edit();         commands.Delete();})          .Width(180);
        })
        .Scrollable()       
        .Render();        
  %>


    Controller - 
    public ActionResult SelectRole(string id)
    {
            ///...
     }

     public ActionResult SaveRole(string id)
      {
            ///....
      }

     
      public ActionResult DeleteRole(string id)
      {
            ///...
      }
        
      public ActionResult InsertRole()
      {
            ///...
      }


Thanks,
Kapil
Tags
Grid
Asked by
Kapil Koli
Top achievements
Rank 1
Share this question
or