How to set default values for search screen parameters in LightSwitch

I recently tried to set default values for my search screen parameters but didn’t find any option. But here is an easy way to do.

Goto code view of you Search Screen and type the following code. I had 4 parameters which I wanted to initialize with some default values. You can use_Created Event for that.

Namespace LightSwitchApplication
    Public Class SearchOrdersSearchQuery
        Private Sub SearchOrdersSearchQuery_Created()
            Me.OrderStartDate = "1/1/1997"
            Me.OrderEndDate = "1/1/2001"
            Me.OrderEmployeeID = "3"
            Me.OrderCustomerList = "ALFKI,VINET"
        End Sub
    End Class
End Namespace

LightSwitch Search Screen Set Default Value for Parameter

Binary World is a Software Development company located in Atlanta, USA (since 2007). Binary World specialized in Business Intelligence, mobile, cloud computing and .Net Application Development.

Tagged with:
Posted in .net, LightSwitch, VB.net

Leave a Reply