RadNumericUpDown not restricting values in CelEditTemplate

15 posts, 0 answers
  1. ITC
    ITC avatar
    19 posts
    Member since:
    Nov 2010

    Posted 22 Dec 2011 Link to this post

    Hi 

    I have the following XAML defining a column with a RadNumericUpDown in the CellEditTemplate

    <telerik:GridViewDataColumn DataMemberBinding="{Binding IntegerProperty}" Header="IntegerProperty">
        <telerik:GridViewDataColumn.CellEditTemplate>
            <DataTemplate>
                <telerik:RadNumericUpDown ValueFormat="Numeric" Value="{Binding IntegerProperty, Mode=TwoWay}" Minimum="1" Maximum="2" ShowButtons="False" NumberDecimalDigits="0">
                </telerik:RadNumericUpDown>
            </DataTemplate>
        </telerik:GridViewDataColumn.CellEditTemplate>
    </telerik:GridViewDataColumn>

    Based on the above XAML, I expect the editor to restrict values to either a 1 or a 2 (these values are just an example). The behaviour I'm experiencing is that when I capture a value outside the min max bounds. The editor does not allow it, but the value displayed by the Grid is the out of bounds value. When I click back on the cell to go to the editor the value is constrained to the bounds. So I'm not sure what the real value is?

    Any ideas?
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 22 Dec 2011 Link to this post

    Hi Dirk,

    What do you mean by : "when I capture a value outside the min max bounds" ?

    All the best,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. ITC
    ITC avatar
    19 posts
    Member since:
    Nov 2010

    Posted 22 Dec 2011 Link to this post

    In the above example the minimum is set to 1 and the maximum is set to 2.

    If you capture a value of '5' and tab away the grid displays '5'. However, if you click on the cell to active the CellEditor you see the value '2' as expected (due to the maxvalue). 

    I would expect the column display value to be '2' as well since the radnumericupdown should have clamped the captured value to the maxvalue.
  5. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 23 Dec 2011 Link to this post

    Hello,

    It seems that you've hit a bug in our control. The bug was fixed immediately and will be available with the next internal build.
    Sorry for the inconvenience caused.

    P.S. I've updated your Telerik points accordingly.

    Regards,
    Nedyalko Nikolov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. ITC
    ITC avatar
    19 posts
    Member since:
    Nov 2010

    Posted 23 Dec 2011 Link to this post

    Thanks, I will try it when the new build is available.
  7. Madhan
    Madhan avatar
    11 posts
    Member since:
    Dec 2011

    Posted 27 Jan 2012 Link to this post

    Is this still a bug?

    In my case, my tester is entering -1 where my range is min 1 and max 500. Since, two binding is enabled, its getting saved into db, but, value got changed to minium.

  8. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 27 Jan 2012 Link to this post

    Hi,

    The state of this bug is done, which means that with the latest version (internal build) everything should work properly.
    Please let me know if you are facing same issue with the latest version.
    Thank you in advance.

    Kind regards,
    Nedyalko Nikolov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  9. Madhan
    Madhan avatar
    11 posts
    Member since:
    Dec 2011

    Posted 30 Jan 2012 Link to this post

    I tried this with internal build for RadNumericUpDown control. But, this issue still persists.
  10. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 30 Jan 2012 Link to this post

    Hello,

    Which version of RadControls do you use? Here you can observe the result with the latest internal build (2011.3.1323.40).

    All the best,
    Nedyalko Nikolov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  11. Madhan
    Madhan avatar
    11 posts
    Member since:
    Dec 2011

    Posted 31 Jan 2012 Link to this post

    I have used 2011.3.1323.40 internal build and I am still having issue.
  12. Vera
    Admin
    Vera avatar
    263 posts

    Posted 02 Feb 2012 Link to this post

    Hello Madhan,

     
    I tested your scenario with version 2011.3.1323.40 and everything worked as expected. Please, take a look at the video I captured. Am I missing something?


    Regards,
    Vera
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  13. Thomas Roithmeier
    Thomas Roithmeier avatar
    17 posts
    Member since:
    Jul 2010

    Posted 10 Apr 2012 Link to this post

    Hello Vera, 

    I am using the Q1 2012 release and I am facing a similar problem.

    I use a RadNumericUpDown, which binds the value to DB-property and sets a Minimum="0". A problem arise, when I click on the down button, when the value is already 0. The displayed value stays at 0, but the value stored in the database gets -1. 

    <telerik:RadNumericUpDown Value="{Binding UnipQuantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Minimum="0" />
    
    This behaviour can be found troughout the complete application. 

  14. Vera
    Admin
    Vera avatar
    263 posts

    Posted 12 Apr 2012 Link to this post

    Hi Thomas,

     
    Unfortunately, we are not able to reproduce the issue. May I ask you to open a support ticket and to send a simple runnable project demonstrating the problem? We will debug it on our side in order to see what is going wrong.

    Looking forward to hearing from you.

    Regards,
    Vera
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  15. Ardnegan
    Ardnegan avatar
    1 posts
    Member since:
    Nov 2015

    Posted 14 Nov 2015 Link to this post

    Hi 

    I using this Telerik RadNumericUpDown in CellEditTemplate, while editing only 5 digits are visible at most. If I enter 6th digit it is truncating the 1st digit of my number. I mean value is not completely visible while I'm editing.

    Can you please check this ASAP.

    Thanks.

  16. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    281 posts

    Posted 17 Nov 2015 Link to this post

    Hello  Ardnegan,
     
    The issue you are experiencing is most probably related to the width sizing of the column that is being edited. Please, make sure it is set to auto in order to achieve the desired behavior. As I am not absolutely aware of your setup and if this does not help, please raise a ticket with a sample project or some code provided and we will be glad to check the issue for you.

    Regards,
    Stefan Nenchev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready