Default checked value

4 posts, 1 answers
  1. Fit2Page
    Fit2Page avatar
    377 posts
    Member since:
    Feb 2007

    Posted 10 Jan Link to this post

    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

  2. Rumen
    Admin
    Rumen avatar
    13278 posts

    Posted 12 Jan Link to this post

    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.
  3. Fit2Page
    Fit2Page avatar
    377 posts
    Member since:
    Feb 2007

    Posted 13 Jan in reply to Rumen Link to this post

    Hi Rumen,

     

    I am programing VB here, not c#

     

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

     

    Marc

  4. Answer
    Rumen
    Admin
    Rumen avatar
    13278 posts

    Posted 13 Jan Link to this post

    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.
Back to Top