This is a migrated thread and some comments may be shown as answers.
RadDateTimePicker Index was out range
2 Answers 4 Views
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 13 Apr 2018, 02:28 PM

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;
}

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Sr.
Telerik team
answered on 16 Apr 2018, 09:23 AM
Hello, Brian,   
 
According to the provided information, I suppose that you are referring to the BugTracker sample project which is located in the installation folder of our suite which is usually located at the following path: C:\Program Files (x86)\Progress\Telerik UI for WinForms R1 2018\Examples\BugTracker

When I try to run the project it seems to behave as expected on my end with the latest version. Please refer to the attached gif file illustrating the behavior I observe. Am I missing something? Do I have to perform any changes in the project before running it? Could you please specify the exact steps how to reproduce the problem? Thank you in advance for your cooperation.

I am looking forward to your reply. 

 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Brian
Top achievements
Rank 1
answered on 16 Apr 2018, 12:45 PM
Thanks Dess, I was using the version of the application from online, not from the samples in the build. The sample from the build runs fine. Please disregard.
Asked by
Brian
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Sr.
Telerik team
Brian
Top achievements
Rank 1
Share this question
or