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

[Solved] Select buttons not appearing on MVC Grid

2 Answers 94 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.
Kent Muller
Top achievements
Rank 1
Kent Muller asked on 09 Jun 2010, 03:21 AM
Hi,

I'm trying to display 'Select' command buttons on my MVC Grid.  Here is my code:

<%= Html.Telerik().Grid<Support.Customer>() 
                        .Ajax(ajax => ajax.Action("_AjaxCustomers", "Support", null)) 
                        .Name("CustomersGrid") 
                        .Pageable() 
                        .Sortable() 
                        .Filterable() 
                        .DataKeys(k => k.Add(n => n.Custcode)) 
                        .Columns(columns => 
                        { 
                            columns.Command(n => n.Select()).Title("Select").Width(100); 
                            columns.Add(n => n.Custcode).Title("Cust Code"); 
                            columns.Add(n => n.Contact).Title("Contact"); 
                            columns.Add(n => n.HomePhone).Title("Home Phone"); 
                            columns.Add(n => n.Email).Title("Email"); 
                        }) 
                    %> 

The grid lines are appearing and there is a 'Select' column however the individual Select buttons don't appear.  I haven't seen any examples of displaying a Select button when using Ajax Binding so I assume that it is possible.

Could someone please advise what I may be doing wrong here?

Thanks, Kent.

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Jun 2010, 08:09 AM
Hi Kent Muller,

The select command currently works only in server binding mode. I suggest you use client selection as shown in the client selection example.

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
Kent Muller
Top achievements
Rank 1
answered on 09 Jun 2010, 08:57 AM
Hi Atanas,

The Client Selection approach is less desirable due to the ease of selecting a row unintentionally.  I'll embed an ActionLink instead so the users know exactly what they are doing.

Thank you for your reply.

Kent.
Tags
Grid
Asked by
Kent Muller
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Kent Muller
Top achievements
Rank 1
Share this question
or