IsReadOnly

8 posts, 0 answers
  1. Avi Avni
    Avi Avni avatar
    98 posts
    Member since:
    Feb 2010

    Posted 25 Nov 2010 Link to this post

    Hello

    I need to give the numeric up down IsReadOnly property, and the user can't input data.

    IsEditableProperty =False  the user can insert data in the keys up/down arrows,page up/down keys.

    How to implement this scenario?

    Best regards

    Ehud.

  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 25 Nov 2010 Link to this post

    Hi Ehud,

    Thank you for contacting us.

    You can use instead the IsEnabled property set to False.

    Hope this will help. If you need further assistance please let us know.

    Regards,
    Konstantina
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. UI for WPF is Visual Studio 2017 Ready
  4. Avi Avni
    Avi Avni avatar
    98 posts
    Member since:
    Feb 2010

    Posted 25 Nov 2010 Link to this post

    Hello Konstantina

    This not good for me, I want to copy/past from the numeric up down.

    Do you have another idea?

    Best Regards

    Ehud

  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 26 Nov 2010 Link to this post

    Hello Ehud,

    You can try setting the SmallChange and LargeChange properties to 0. In that way when you click the arrows the value will increase/decrease with 0, so it will remain the same.

    <telerik:RadNumericUpDown SmallChange="0" LargeChange="0" IsEditable="False" />

    Hope this will help. Please let us know if you have any other questions.

    Sincerely yours,
    Konstantina
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  6. Arnaud
    Arnaud avatar
    17 posts
    Member since:
    Mar 2013

    Posted 29 Jan 2015 in reply to Konstantina Link to this post

    Hello,

    The proposed solution is not working. I tried several approaches to switch this control into a readonly version without success. So far I have to put an invisible textbox and switch visibility at demand. Boring... Why don't you implement an IsReadOnly property, as most controls do ? Telerik make me lose time with this simple requirement !

    Arnaud.
  7. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 03 Feb 2015 Link to this post

    Hello Arnaud,

    I'm sorry to hear about your frustration. However we have that logged in our Feedback portal as Feature Request - you can track and vote for the item on the following link:
    http://feedback.telerik.com/Project/143/Feedback/Details/123258-add-readonly-property-to-the-numericupdown-control

    If you have any other questions, please let us know.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Johannes
    Johannes avatar
    66 posts
    Member since:
    Dec 2012

    Posted 13 Mar 2015 Link to this post

    This was posted in 2010 and there is still no ReadOnly property in this control. IsEditable does still not work in Q3/2013. Setting IsEditable to false you can still change RadNumericUpDown's value.

    Like Arnaud I also don't understand why we have to search the forums to find a solution for such a simple scenario. Nearly every other control has a ReadOnly property so this such have it too.
  9. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 16 Mar 2015 Link to this post

    Hi Johannes,

    Thanks for your feedback. However I'm afraid I cannot commit any time frame for this feature request. What I can suggest you meanwhile would be to manually disable the buttons in the Loaded event handler (for example) when the control is not editable:

    private void Num_Loaded(object sender, RoutedEventArgs e)
    {
        var numeric = sender as RadNumericUpDown;
        if (!numeric.IsEditable)
        {
            (numeric.Template.FindName("increase", numeric) as RepeatButton).IsEnabled = false;
            (numeric.Template.FindName("decrease", numeric) as RepeatButton).IsEnabled = false;
        }
    }

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready