Show those values which was stored in the SharePoint ListItem.
For display selected value use previous post’s “InputFormCheckBoxList”
Select listitem for display choice field’s multiple value as below
if (item["multivalued choice field name"] != null)
{
SPFieldMultiChoiceValue multiValue = new SPFieldMultiChoiceValue(item["multivalued choice field name"]);
for (int i=0; i<= multiValue.Count; i++) multiValueInputFormCheckBoxList.Items.FindByText(multiValue[i]).Selected = true; }
Happy Coding !!!
first of all thanks to you
ReplyDeletefor (int i=0; i<= multiValue.Count; i++) multiValueInputFormCheckBoxList.Items.FindByText(multiValue[i]).Selected = true;
giving me following error
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
for (int i=0; i< multiValue.Count; i++) multiValueInputFormCheckBoxList.Items.FindByText(multiValue[i]).Selected = true;
ReplyDeleteIt should be like this