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

MVC Grid drop-down list column

6 Answers 364 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeff
Top achievements
Rank 1
Jeff asked on 08 Jul 2010, 04:57 PM
Greetings,

I would like to place a drop-down list in a column of the MVC grid and allow the user to modify the drop-down list value on multiple rows prior to submitting the form. After the form is submitted I need to retrieve all the drop-down values in the controller. Each drop-down would need to have a distinct name so I can determine which row it came from. Is this even possible? If so, how would I represent the drop-down values in the model?

Any help would be appreciated.

Thanks.
 Jeff

6 Answers, 1 is accepted

Sort by
0
Love
Top achievements
Rank 1
answered on 21 Mar 2011, 07:36 PM
Did you figure out how to implement this? I am in the same boat and I can't find the solution. Pls help.
0
GURARPAN
Top achievements
Rank 1
answered on 01 Jun 2011, 09:03 PM
Please let me know if you find solution to the described problem.

Any help would be appreciated .

Thanks.
Gurarpan
0
Troy
Top achievements
Rank 1
answered on 17 Aug 2011, 06:03 PM
I am also trying to figure this out. I've found a dozen or so questions like this across this site and more on others, and so I know this is a common problem. Yet, somehow, none of those questions, including this one, have answers to them. I'm not sure what that means, but I'm hoping it doesn't mean that it is impossible to do.

If you have worked this out, and wouldn't mind sharing, that would be awesome.
0
Atanas Korchev
Telerik team
answered on 18 Aug 2011, 06:22 AM
Hi ,

There is a code library project which shows how to integrate a combobox with grid in cell editing mode (which allows to edit more than one row and then submit the changes). You can check that project for a reference.

Kind 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
Nate
Top achievements
Rank 1
answered on 20 Sep 2011, 05:40 PM
Can somebody provide a simple code sample that creates a drop down list for a column. I looked at the sample project in this thread, and I see the drop down list in the control (ascx), but I don't see, or don't recognize, how it is tied to the grid. Also, I can't run the project, it is having some errors...

Thanks,
0
Atanas Korchev
Telerik team
answered on 21 Sep 2011, 07:07 AM
Hi Nate,

 What errors are you getting? The project requires ASP.NET MVC 3 and builds and runs ok at my side. The combobox is tied in the grid by means of ASP.NET MVC editor templates:

[UIHint("Employee"), Required]
public EditableEmployee Employee { get; set; }

The UIHint attribute tells ASP.NET MVC to use the partial view called Employee.cshtml as the editor of the Employee property. You can find more info about ASP.NET MVC templates in this excellent blog post.

You can also check this code library which is for inline editing.

All the best,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Love
Top achievements
Rank 1
GURARPAN
Top achievements
Rank 1
Troy
Top achievements
Rank 1
Atanas Korchev
Telerik team
Nate
Top achievements
Rank 1
Share this question
or