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

Default checked value

3 Answers 65 Views
CheckBox
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Fit2Page asked on 10 Jan 2017, 10:25 AM

Hi,

 

For native ASP.Net checkbox de default cheked is False.

For radcheckbox I get an error EG this line:

 

pnl_AfwijkendAfleveradres.Visible = chk_othershipping.Checked

ERROR

Nullable object must have a value.

 

Marc

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Jan 2017, 04:52 PM

Hi Marc,

You can achieve the requested functionality and avoid the error by modifying your code to:

pnl_AfwijkendAfleveradres.Visible = chk_othershipping.Checked == true;

 

Best regards,
Rumen
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 13 Jan 2017, 07:29 AM

Hi Rumen,

 

I am programing VB here, not c#

 

Im setting the panel's visiblity directly from the checkbox checked property.

 

Marc

0
Accepted
Rumen
Telerik team
answered on 13 Jan 2017, 04:13 PM

Hi,

You can implement a solution based on the HasValue property

pnl_AfwijkendAfleveradres.Visible = chk_othershipping.Checked.HasValue

Regards,
Rumen
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
CheckBox
Asked by
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Rumen
Telerik team
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Share this question
or