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

Cannot get command buttons to appear when creating an editable grid

6 Answers 54 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.
Andy McShane
Top achievements
Rank 1
Andy McShane asked on 13 Apr 2010, 12:44 PM
Hi, I am using the following code to create an editable grid,

<%= Html.Telerik().Grid(Model) 
        .Name("Grid") 
        .DataKeys(keys => keys.Add(c => c.SubLicenceId)) 
        .DataBinding(dataBinding => dataBinding.Ajax() 
                                        .Select("_SelectAjaxEditing", "Grid") 
                                        .Insert("_InsertAjaxEditing", "Grid") 
                                        .Update("_SaveAjaxEditing", "Grid") 
                                        .Delete("_DeleteAjaxEditing", "Grid")) 
        .Columns(columns => 
        { 
            columns.Bound(c => c.TreatmentShortname).Title("Treatment"); 
            columns.Bound(c => c.SubLicenceQuantity).Title("Available"); 
            columns.Bound(c => c.SubLicenceQuantityUsed).Title("Used"); 
            columns.Bound(c => c.SubLicenceUnlimited).Title("Unlimited"); 
            columns.Bound(c => c.IsActive).Title("Active"); 
            columns.Command(commands => 
            { 
                commands.Edit(); 
                commands.Delete(); 
            }).Width(180); 
        }) 
        .Pageable() 
%> 

I must be missing something as I am unable to get the 'Edit' button to appear in my grid, what am I doing wrong?

6 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 13 Apr 2010, 12:48 PM
Hi Andy McShane,

Make sure you are using the ASP.NET MVC2 build of Telerik.Web.Mvc.dll. Its assembly version must end with
".235" if it is the right build.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Andy McShane
Top achievements
Rank 1
answered on 13 Apr 2010, 02:12 PM
Oh, does this not work with MVC 1.0 then?
0
Andy McShane
Top achievements
Rank 1
answered on 14 Apr 2010, 09:25 AM
I am using Telerik.Web.Mvc 2010.1.309.135, MVC 1.0. Is the editable grid functionality not available for MVC 1.0 then, do I have to upgrade to MVC 2 (which is not really an option)?
0
Accepted
Atanas Korchev
Telerik team
answered on 14 Apr 2010, 09:42 AM
Hello Andy McShane,

I confirm that editing is not supported in ASP.NET MVC 1. There are quite a lot of features provided out of the box by ASP.NET MVC 2 which we would have implemented from scratch in order to support editing in ASP.NET MVC 1.

By the way why is upgrading to ASP.NET MVC 2 not an option for you? It has been officially released and is available free of charge. Upgrading an existing ASP.NET MVC 1 project is a breeze thanks to this tool.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Andy McShane
Top achievements
Rank 1
answered on 14 Apr 2010, 11:01 AM
The reason upgrading to MVC 2.0 is not an option is because of the huge amount of regression testing that would be required to ensure that things did not break (and there are quite a few breaking changes in MVC 2.0!) and that is simply not an option for this project with the deadlines in place.However I will certainly put the case forward if I cannot find an alternate grid to use, thanks.
0
Andy McShane
Top achievements
Rank 1
answered on 14 Apr 2010, 11:37 AM
Well, I have put my case forward for an upgrade so fingers crossed!
Tags
Grid
Asked by
Andy McShane
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Andy McShane
Top achievements
Rank 1
Share this question
or