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

Post Selected items back to Controller

1 Answer 231 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Zong
Top achievements
Rank 1
Zong asked on 17 Apr 2014, 01:41 PM
I have looked all over.  I would think this would be simple to do.  If I have a listview control inside of a MVC form.  How do I get the items selected in the listview to post back to the controller?

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 21 Apr 2014, 08:11 AM
Hi Zong,

Forms include only input element that have a name attribute. If you wish to include the ListView items I would suggest subscribing to the form's submit event and manually attaching the selected items to the form's body. Here is an example illustrating how this approach could be implemented.

Regards,
Alexander Popov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ListView
Asked by
Zong
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or