C1InputPanel.InputNumericBox

Posted by: connellyj on 24 April 2018, 11:57 pm EST

    • Post Options:
    • Link

    Posted 24 April 2018, 11:57 pm EST

    I am using C1InputPanel with several C1InputPanel.InputNumericBox’s. I have set the minimum and maximum properties for these boxes. If the underlying dataset has a value outside of the range the recordset is not displayed. It does not throw an error it just won’t go there. Is there an event, method or property I can use to flag the field, skip the field, notify the user, bypass the record…?

  • Posted 25 April 2018, 5:01 pm EST

    Hello,

    Thank you for sharing your requirements. In order to meet them, please refer attached sample application wherein its showed how to keep focus to the control if it fails validation and also shows error message and custom tooltip.

    Let me know, if you need any further assistance.

    Regards,

    Ruchir AgarwalError_C1InputPanel.zip

  • Posted 26 April 2018, 4:08 am EST

    I was trying to use the Minimum and Maximum properties but I guess I cannot…

  • Posted 26 April 2018, 5:11 am EST

    I can handle user input error trapping.

    My problem is if the underlying dataset has values outside the range of the Minimum/Maximum properties the applicable records will not display. All is good if the number is in range and all error trapping works. What can I do to display the recordset that has an out of range number?

  • Posted 27 April 2018, 1:01 am EST

    Hi,

    I now understand what trying to ask. I am able to observe the behavior, I am investigating over whether is there any way of detecting it and handling it. I will get back to you one this soon.

    Regards,

    Ruchir

  • Posted 20 May 2018, 10:50 pm EST

    Still waiting…

  • Posted 21 May 2018, 4:09 am EST

    Hi,

    Apologies in taking time in getting back to you.

    The issue is with the development team [TFS: 322988]. I will update you once we receive some information/solution from them.

    ~Ruchir

  • Posted 23 May 2018, 8:43 pm EST

    Hi,

    If you want to display data outside the min/max range, there is no solution as such. But you can notify the user about this using the BoundValueChanged event and the ValueIsNull property.

    The inputNumericBox sets the ValueIsNull as true when it can’t apply a bound value.

    Example:

    
    private void InputNumericBox_BoundValueChanged(object sender, EventArgs e)
            {
                if (inputNumericBox.ValueIsNull)
                {
                    inputNumericBox.ErrorText = "Error text";
                }
            }
    
    

    ~Pragati

  • Posted 29 May 2018, 12:37 am EST

    It does not get there. It does not load the record or any the other fields that are ok.

    So it does not trigger the BoundValueChanged for the number field or for the InputDataNavigator

  • Posted 29 May 2018, 10:40 pm EST

    We are investigating this further, and will update you soon.

    Thanks,

    Meenakshi

  • Posted 31 July 2018, 1:47 am EST

    Any update?

  • Posted 31 July 2018, 2:25 pm EST

    Hi!

    The team came out with a workaround in this case, where you need to use PositionChanged event of inputDataNavigator1 to track movement through the records and update the ErrorText property of inputNumericBox1.

    Attached is the application for your reference.

    DataBinding_workaround.zip

    Regards,

    Meenaskhi

  • Posted 7 August 2018, 6:58 am EST

    This is only marginally helpful because I am using VB.net.

    The PositionChanged event is not reached when I have data out of range. In the Output window I see:

    Exception thrown: ‘System.ArgumentException’ in C1.Win.C1InputPanel.4.dll

    Exception thrown: ‘System.Reflection.TargetInvocationException’ in mscorlib.dll

    Exception thrown: ‘System.ArgumentException’ in System.dll

    Exception thrown: ‘System.ArgumentException’ in System.Windows.Forms.dll

    but I cannot figure out where to trap it.

  • Posted 7 August 2018, 7:46 pm EST

    I am attaching the equivalent code in VB, for your reference. Kindly see the attached sample.

    DataBinding_Workaround_VB.zip

    Kindly modify this, if there is any additional code to replicate the issue at my end.

    Also, I am not able to see any such exceptions in this sample. Attached is the demonstrating video.

    • Meenakshi
  • Posted 7 August 2018, 7:47 pm EST

    #DemoVideo Vid_DataBinding.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels