I have created a IList given as below:
[CultureSpecific]
[Display(Name = "Items", GroupName = PropertyGroupNames.Content, Order = 20)]
[EditorDescriptor(EditorDescriptorType = typeof(AnswerListPropertyDescriptor))]
[ListItems(4)]
public virtual IList<AnswerBlock> Answers { get; set; }
AnswerBlock is a class I have created:
public class AnswerBlock
{
[CultureSpecific]
[Display(Name = "Answer Text", GroupName = PropertyGroupNames.Content, Order = 10)]
public virtual string AnswerText { get; set; }
[CultureSpecific]
[Display(Name = "Correct Answer", GroupName = PropertyGroupNames.Content, Order = 20)]
public virtual bool IsCorrect { get; set; }
}
IsCorrrect is a type of a checkbox
I add multiple elements in the dropdownlist created due to IList
The problem is that II'm able to set true to multiple checkboxes present in the IList
I just want to limit it upto 1. i.e I should only be able to set 1 checkbox to true in IList.
Please help