Show default value for nullable field

2 posts, 0 answers
  1. Dale
    Dale avatar
    14 posts
    Member since:
    Jul 2013

    Posted 09 Sep 2014 Link to this post

    Hi all,

    I have a discount % field that's a nullable int, and uses an up/down editor.  Users want to show "None" in the field when the value is null, and want to be able to select "None" in addition to values 0 - 100 when editing the field.  Is there a feature in place to display a default value for null?

    As it stands, it shows empty in the grid, and you can clear the text in the editor to revert back to null.  It works functionally, but may not satisfy the request.

    If the feature doesn't currently exist, what would be the best way to go about enhancing the up/down control to enable it?

    Thanks!
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1444 posts

    Posted 11 Sep 2014 Link to this post

    Hello Dale,

    This could be achieved by using a custom editor template for the discount field. The editor template should initialize a NumericTextBox widget and specify its placeholder option.

    Regards,
    Alexander Popov
    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