Databinding checkbox state

4 posts, 0 answers
  1. Shashi
    Shashi avatar
    25 posts
    Member since:
    Feb 2011

    Posted 01 Jun 2011 Link to this post

    Hello,

    I am writing a test that verifies the states of a bunch of tri-state check boxes (Telerik Silverlight controls) on a page.  The states need to be verified against a list of expected check box states. 

    I have been able to record the test with the expected states hard-coded (see example below)- it is running fine.

    Verify UpdateCheckbox0's checked state is Unchecked


    However, I would now like to data-bind the test so that the verification steps get their expected states ("Unchecked" in the above example) from an external source which can be easily changed in future without modification of the test code. 

    However, I am unable to do this at the moment for the following reason:
    I bound the test to the built-in database and added a row in the database with the expected values (I did rename the columns to something meaningful).  For the expected values in the database, I used the same values as in the Value dropdown in the Properties of the verification step in the hard-coded version i.e. "Indeterminate", "Checked", "Unchecked".  The problem is that when I click the Bindings dropdown on the Verification state, the Properties collection is empty.

    Additional information:
    The check boxes are children of a radtreeviewitem.  I was not able to record the verification steps for the state of these check boxes in the normal way (i.e. hover over the control, choose the right level of the translator and click on it).  Instead, I had to locate the radtreeviewitem in the DOM Browser, drill down to the check boxes, bring up their Element menu and then record the verification step for their state.

    Is it not possible to do what I am trying above?  If not, what am I missing?  If it is not possible to do the above, is there any other way to accomplish the ultimate goal?

    Your help would be much appreciated.  Let me know if you have any questions.

    Thanks,
    Shashi

  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 03 Jun 2011 Link to this post

    Hi Shashi,
        I'm unable to reproduce this.

    The "normal" HTML checkboxes (i.e. input of type "checkboxes"):
    http://www.w3schools.com/html/tryit.asp?filename=tryhtml_checkbox
    can add Verify state statements (screenshot 1) and this can be data-bound (screenshot 2) to a boolean-based file (I've attached one for you to check out).

    On the other hand there are checkboxes that "masqueraded" as different HTML elements (say span) and you can't Verify their checked state:
    http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/checkboxes/defaultcs.aspx
    See screenshot 3.
    This particular checkbox is <span class="rtUnchecked">
    However, it's still possible to test its state and make it databound in a coded step.

    I'm not 100% sure of your use case and which of these issue's you're encountering. Please give me some additional info.

    All the best,
    Stoich
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. Shashi
    Shashi avatar
    25 posts
    Member since:
    Feb 2011

    Posted 03 Jun 2011 Link to this post

    Hi Stoich,

    In case you haven't already done so, please read the Additional Information section of my last email.  Also, please note that we are using the Telerik Silverlight controls for all our UI.  So both the tree view control and check boxes are Silverlight controls.  I am attaching a screen shot and the DOM browser for one of the rows of the tree control (the two are not for the same row).

    Hope the above helps you in reproducing the issue.  Please let me know if you need further information.  NOTE:  It is much easier for me to answer specific questions rather than generic requests for additional info. 

    Thanks,
    Shashi
  4. Daniel Djambov
    Admin
    Daniel Djambov avatar
    62 posts

    Posted 06 Jun 2011 Link to this post

    Hi Shashi,

    You are correct - it is currently not possible to data bind the checkbox states in a Silverlight RadTree control - we have not exposed this functionality. I will add a feature request in our public issue tracking system about it so you can track when it will be available in our next releases.

    Sorry for the inconvenience caused,

    Greetings,
    Daniel Djambov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!