RadDateTimePicker Index was out range

3 posts, 1 answers
  1. Brian
    Brian avatar
    37 posts
    Member since:
    Jul 2010

    Posted 13 Apr 2018 Link to this post

    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. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4125 posts

    Posted 16 Apr 2018 Link to this post

    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.
  3. Brian
    Brian avatar
    37 posts
    Member since:
    Jul 2010

    Posted 16 Apr 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    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.
Back to Top