Lightswitch html radiobuttons in a table.Browse screen RRS feed

  • Question

  • Let's say I have two tables, one called Document, and one for the document DocStatus (contains one property Status(string) Here I have entered 5 different status categories. After I set up a relationship between the two tables, I would like to show it in a BrowseScreen.

    In this browse screen I would like to show each row of documents, with radiobuttons representing the DocStatus, which one then could alter.

    When it comes to rendering the custom control as a radiobutton I'm OK, but it only shows one button instead of 5 buttons. How do I push out the 5 entries in the DocStatus table to the browsescreen with labels? And how to make sure that when I click the save button, the changes are saved to the dB?

    If someone has done something similar before, I would really be very grateful. 

    I've been looking at Jewel Lamberts article about radiobuttons, but I feel a little overwhelmed.....

    • Edited by hasse_76 Sunday, November 23, 2014 7:12 PM
    Saturday, November 22, 2014 3:57 PM

All replies

  • First of all thanks for your feedback LuckPoer, and I'm sorry for bothering you guys with my lack of programming skills. But i'm kind of desperate when it comes to achieve this.

    Your examples seem to be directed at the silverlight client, but i am trying to accomplish this in the HTML client.

    Just to clarify:

    This is the scenario. I have one table called document. In the add/edit screen the user registers the document, with title, department, description and so on.Maybe it is better to have two tables here. As a doc can only have one status, but status can contain several documents?

    When the users see the documents in the browse screen, they also want the tablerows for each document to contain several radiobuttons. Each radiobutton representing a step in the document approval status.

    When the user click a radiobutton, this is somehow saved, and when the user then close and reopen the application the radiobutton will still be ticked off. (of course only one radiobutton pr. row can can be ticked off)

    Does anyone know how to accomplish this? Should I make x numbers of radiobuttons as custom controls, displaying in columns of their own, and most important. How can I save the status of the radiobuttons. Jewel Lambert has an article describing the use of radiobuttons in an add/edit screen, but my users want this in the browse screen.I have also followed the tutorial at


    What would be the best way to accomplish this. Should I make a property in the table lets call it status, and then somehow bind the custom control to it, and how would I push the information in the custom radiobutton to the string field of the status property?

    • Edited by hasse_76 Wednesday, November 26, 2014 1:57 PM
    Wednesday, November 26, 2014 1:57 PM
  • Anyone?
    Thursday, November 27, 2014 7:20 AM
  • Well I have tried a couple of solotions, like using the component one wijmo grid, and following the article there, for adding radiobuttons in lightswitch. Sure I get the colum with the x number of appended buttons in the browsescreen gridtable. But if I check one button i row one, and then check another button in row 2. the checkmark in row ones radiobutton dissappears.

    How to connect the radiobuttons to each element, and then apply some logic to update/save the changes to the element(s)?

    Friday, November 28, 2014 11:47 AM