Search code examples
javascriptlightswitch-2013

Adding a custom text label in Lightswitch 2013


This seems like a relatively simple issue however I don't seem to be able to find anything on the internet or I'm not searching for the right thing so here's my question:

I have added a custom string parameter to my screen... lets call it Title. Now what I want to do is add this to the screen and underneath the label that says title, I want it to say Book. So im not passing anything into it, I just want to add a custom label to my screen, I've tried this with little success

contentItem.screen.Title == "Books";

Any help would be great, cheers :)


Solution

  • Solved:

    myapp.ViewBookshelf.Books_postRender = function (element, contentItem) {
    
    element.innerText = "Books"
    element.style.fontWeight = 'bold';
    element.style.fontSize = "21px";
    };
    

    for Ints or Booleans

    contentItem.value = false;
    contentItem.value = 0;