This is a migrated thread and some comments may be shown as answers.

Show default value for nullable field

1 Answer 195 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dale
Top achievements
Rank 1
Dale asked on 09 Sep 2014, 07:14 PM
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!

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 11 Sep 2014, 08:24 AM
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.

 
Tags
Grid
Asked by
Dale
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or