I'm using the RadioGroup and setting the for to a string property in my page model. The Get is working fine with displaying the value in the model but when I save the form, in the post the for value is null. Any ideas on how to get this to work?
Razor Page
<
kendo-radiogroup
for
=
"Input.OwnOrRentId"
label-position
=
"RadioGroupLabelPosition.Before"
layout
=
"RadioGroupLayout.Horizontal"
bind-to
=
"Model.OwnOrRentItems"
>
</
kendo-radiogroup
>
Code behind
[BindProperty]
public
InstallerPageModel Input {
get
;
set
; }
public
List<IInputGroupItem> OwnOrRentItems {
get
;
set
; }
OwnOrRentItems =
new
List<IInputGroupItem>()
{
new
InputGroupItemModel()
{
Label = OwnOrRentOptions.Own.GetDescription(),
Value = OwnOrRentOptions.Own.NumericValue().ToString(),
Enabled =
true
,
CssClass =
"green"
,
Encoded =
false
,
HtmlAttributes =
new
Dictionary<
string
,
object
>() { {
"data-custom"
,
"custom"
} }
},
new
InputGroupItemModel()
{
Label = OwnOrRentOptions.Rent.GetDescription(),
Value = OwnOrRentOptions.Rent.NumericValue().ToString(),
Enabled =
true
,
CssClass =
"green"
,
Encoded =
false
,
HtmlAttributes =
new
Dictionary<
string
,
object
>() { {
"data-custom"
,
"custom"
} }
}
};
public
class
InputGroupItemModel :IInputGroupItem
{
public
IDictionary<
string
,
object
> HtmlAttributes {
get
;
set
; }
public
string
CssClass {
get
;
set
; }
public
bool
? Enabled {
get
;
set
; }
public
bool
? Encoded {
get
;
set
; }
public
string
Label {
get
;
set
; }
public
string
Value {
get
;
set
; }
}