You are here:   Forum
Register   |  Login

 

Forum Notice

This Forum is ARCHIVE only
For LightSwitch questions,
please use the official forums at:

http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads


Forums

Read Only Fields
Last Post 16 Aug 2011 05:05 AM by admin. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Andy DruryUser is Offline
New Member
New Member
Send Private Message
Posts:19
Avatar

--
16 Aug 2011 04:49 AM
    Very New to Light Switch and would appreciate any assistance

    Is it possible to have a field on a screen become read only dependant upon the value in certain fields, when its first loaded and during screen entry ?

    What would be the best way to force several fields on a screen to be entered dependant on the value of another. i,e when a status set to Order, require order date, order number etc.

    Regards

    Andy
    Michael WashingtonUser is Offline
    Send Private Message
    Posts:1232
    Avatar

    --
    16 Aug 2011 04:58 AM
    What would be the best way to force several fields on a screen to be entered dependant on the value of another. i,e when a status set to Order, require order date, order number etc.

    There are no code samples I can think of, but I would use a Silverlight Custom control. Some like to use FindControl in the LightSwitch page code behind to attach events to controls, but I think that you can end up with a lot of hard to decipher 'spaghetti code' (however it will also work).
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    Michael WashingtonUser is Offline
    Send Private Message
    Posts:1232
    Avatar

    --
    16 Aug 2011 05:05 AM
    I just saw this thread that may help:
    http://social.msdn.microsoft.com/Fo...cf97cd2169
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    You are not authorized to post a reply.


    Latest Microsoft Visual Studio LightSwitch Forum Threads That Have Answers

    Hi, I am able to get the original values for native properties of a table, but how can i get the original value for properties releated with another table. Here's my code.   Dictionary<string, string> originalValues = new Dictionary<string, string>();            foreach (var prop in entity.Details.Properties.All().OfType<IEntityTrackedProperty>())            {                if (prop.OriginalValue != null)                {    originalValues.Add(prop.Name.ToString(), prop.OriginalValue.ToString());                }            } Any help on this?
    Read more...

    Hi all, I've been trying to exclude a few records from a query-result by using the preprocess method of the query object. The scenario I'm trying to achieve: exclude all products already chosen in orderdetailrecords from a products-pulldownlist when adding a new record as orderdetail. I'm have come up with this code, query is called TestProduct, orderID is fixed for testingpurposes to 685 returning two products to be excluded from final result:         Private Sub TestProduct_PreprocessQuery(ByRef query As System.Linq.IQueryable(Of LightSwitchApplication.Product))             Dim myOrderDetails = Me.DataWorkspace.ApplicationData.OrderDetails.GetQuery().Execute()             Dim productsCurrent = From myOrderDetailsSelect In myOrderDetails Where myOrderDetailsSelect.Order.orderID = 685 Select myOrderDetailsSelect.Product             'Make productscurrent
    Read more...

    Hi I have been putting together a LS project for a large organisation (VS2013), currently we have circa 200 users on the silverlight client, its going well. During the development of the Silverlight client we mocked up a quick html client to as a proof of concept for those in the field which, for what is was worked fine. After reading through all the books to bring myself up to speed with moving to the HTML client I've run into a brick-wall from day one. When-ever I add new controls (text boxes, table views etc) or properties to an existing screen, the properties (when moved onto the page) become read-only and new tables etc are greyed out and wont list any data. Additionally if I try to create a new screen it simply wont load (no error message, nothing). Properties that already existed on the page continue to work fine. However if I delete, recreate and place these existing properties on the screen they become read-only. There is nothing I can seem to do to turn this
    Read more...

    I have made a small database for storing the presence of my volleyball team during training. Furthermore I used Lightswitch to insert the data. For the trainings I have a screen showing all the information (date, time, place, ...) and I can add a player to this training and the status, e.g. if she was there, or if her absence was without excuse or not. There is a data grid, where I can add a palyer, her status, ...  I use a auto complete box to choose the right player, then I set her training status a.s.o. But some of the players in the database are not active, so I don't want to see them in the box, when I choose the player. I have a property "active" for that. The question is, how can I achieve, that only the players with "active==TRUE" are shown in this box? Is it possible to filter that somehow. Thanks for your help, stephan mc stephan mc
    Read more...

    Create Generic Class
    6/23/2015 6:30 AM
    Hi, i've created a UserCode on SL Client named Albaran . I would like to call this class from a details screen, to make operations in database. With this class i call from many screens. In a details Screen i have a function with this code: Try                             Dim result = From contador In Me.DataWorkspace.GESTION.series                         Where contador.EMPRESA = empresa And contador.SERIE = serie And contador.TIPODOC = tipodocumento                         Select contador                             albaranencurso = result.Single().CONTADOR                             siguientealbaran = result.Single().CONTADOR      
    Read more...

    1234
    Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation