Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to use the CheckBoxList and RadioButtonList editors to edit Model fields

$
0
0

This example illustrates how to edit Model fields with different DevExpress MVC Editors.

Here are main requirements:
- The editor's Name property should be equal to the corresponding Model field;
- The DevExpressEditorsBinder should be used for retrieving Model fields from corresponding Editors.

The CheckBoxList Extension is used in an Unbound mode and bound with the specific Model field manually (with custom code):
The CheckBoxListSettings.PreRender handler/delegate is used for specifying multiple selected Items based on the enumerable Model field;
The CheckBoxListExtension.GetSelectedValues<T> is used for retrieving multiple selected Items on the Controller side.

Question Comments

Added By: Milder Castillo at: 3/15/2015 9:47:53 PM    

It doesn't work with DevExpress 14.2 and VS 2013, CheckBoxListExtension.GetSelectedValues returns null even I see the Request.Form plenty of values coming from the POST operation. So far my experience with DevExpress hasn't been pleasant :(

Added By: Mike (DevExpress Support) at: 3/16/2015 1:48:11 AM    

Hello Milder,

To process your recent post more efficiently, I created a separate ticket on your behalf: T219663: CheckBoxList - GetSelectedValues Returns Null. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>