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

[Solved] CurrencyTextBox with nullable decimal: "value" cannot be null or emtpy

0 Answers 187 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
bbeatty
Top achievements
Rank 1
bbeatty asked on 26 Mar 2012, 05:58 PM
I have the following EditorTemplate

@model decimal?
 
 
@(Html.Telerik().CurrencyTextBox()
    .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
    .InputHtmlAttributes(new {style="width:100%"})
    .CurrencySymbol("")       
    .MinValue(0)
    .Value(Model ?? 0))
 

"value" cannot be null or empty.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: "value" cannot be null or empty.

Source Error:

Line 2:  
Line 3:  
Line 4:  @(Html.Telerik().CurrencyTextBox()
Line 5:      .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
Line 6:      .InputHtmlAttributes(new {style="width:100%"})


What am I doing wrong?
Tags
NumericTextBox
Asked by
bbeatty
Top achievements
Rank 1
Share this question
or