C1FlexReport and Checkbox value Vb.Net

Posted by: saidnai on 18 June 2019, 3:17 am EST

    • Post Options:
    • Link

    Posted 18 June 2019, 3:17 am EST

    Dear all,

    How to assigne a value and the Text for a Checkbox in a C1FlexReport per VB.NET?

    The Following for a Textfield is working well:

    Dim Fld1 As New TextField

    Fld1 = DirectCast(FR.Fields(“Title”), TextField)

    Fld1.Text = “History”

    Best regards

    Said

  • Posted 18 June 2019, 4:34 am EST

    Hello Said,

    You can use the below mentioned code to set the Text and Value for a CheckBoxField at run-time:

            Dim fld As New CheckBoxField
            fld = DirectCast(C1FlexReport1.Fields("Field4"), CheckBoxField)
            fld.Value = 1 'OR fld.Value = True
            fld.CheckAlign = PictureAlignEnum.LeftTop
            fld.Text = "Student"
    

    Hope it helps.

    Regards,

    Esha

  • Posted 18 June 2019, 4:57 am EST

    Dear Esha,

    Thanks a lot for the quick reply.

    That is it. I was missing * “CheckBoxField”

    . I was using only * “Checkbox”

    that is why it was not working.

    :slight_smile:

    Best regards

    Said

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels