Clear Controls from code behind

1 Answer 163 Views
ComboBox SignaturePad
n/a
Top achievements
Rank 1
n/a asked on 06 Jul 2023, 08:30 PM

Is there a method or process to clear a SignaturePad or ComboBox from the code behind?   

For instance, a user fills out the page and clicks a Save button, after saving the data, all controls should be blanked out.

thank you!

1 Answer, 1 is accepted

Sort by
0
Lance | Senior Manager Technical Support
Telerik team
answered on 06 Jul 2023, 08:42 PM | edited on 06 Jul 2023, 08:55 PM

Hi Christopher,

This depends on whatever control you're using. For example SignaturePad and ComboBox are two very different controls with different data presentation and selection methods.

  • For the ComboBox, you might set the SelectedItem to null
  • for the SignaturePad, you only need to look to the Commands documentation for the answer => SignaturePad - Commands.

To try and answer any potential future questions:

  • For an Entry you set the Text to string.Empty
  • For NumericInput you set Value to 0

...and so forth. It really comes down to what the control is and how it handles it's data. Just think about what can be set back to the default value.... then manually set that default value.

I hope this helps!

Regards,
Lance | Manager Technical Support
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ComboBox SignaturePad
Asked by
n/a
Top achievements
Rank 1
Answers by
Lance | Senior Manager Technical Support
Telerik team
Share this question
or