I am working on the Bug Tracker sample and am getting this error when I try to run the program;
System.ArgumentOutOfRangeException: 'Index was out of range.
Must be a non-negative and less than size of the collection.
Parameter name index'
Below is the offending code. I am not seeing what is wrong with this;
private void ReadOnlyControls(bool readOnly)
{
titleTextBox.ReadOnly = readOnly;
idSpinEditor.ReadOnly = readOnly;
descriptionTextBox.ReadOnly = readOnly;
stepsToReproduceTextBox.ReadOnly = readOnly;
idSpinEditor.ShowUpDownButtons = !readOnly;
dateDateTimePicker.DateTimePickerElement.TextBoxElement.TextBoxItem.ReadOnly = readOnly;
RadDateTimePickerArrowButtonElement arrowButton = dateDateTimePicker.DateTimePickerElement.Children[1].Children[1] as RadDateTimePickerArrowButtonElement;
arrowButton.Visibility = readOnly ? ElementVisibility.Collapsed : ElementVisibility.Visible;
priorityDropDownList.DropDownListElement.ArrowButton.Visibility = readOnly ? ElementVisibility.Collapsed : ElementVisibility.Visible;
priorityDropDownList.DropDownListElement.TextBox.TextBoxItem.ReadOnly = readOnly;
statusDropDownList.DropDownListElement.ArrowButton.Visibility = readOnly ? ElementVisibility.Collapsed : ElementVisibility.Visible;
statusDropDownList.DropDownListElement.TextBox.TextBoxItem.ReadOnly = readOnly;
ownerDropDownList.DropDownListElement.ArrowButton.Visibility = readOnly ? ElementVisibility.Collapsed : ElementVisibility.Visible;
ownerDropDownList.DropDownListElement.TextBox.TextBoxItem.ReadOnly = readOnly;
}