Here we will see how to display a default value in a LightSwitch Application (Visual C#) in Visual Studio 2012.
The following is the procedure of displaying a default value.
Step 1
Open the Solution Explorer.
Step 2
In the Solution Explorer, right-click on the Server and choose "Add Table".
Step 3
The table appears.
Here in the table select the DOJ (Date Of Joining) field and go to the property window. Uncheck the "Display by default" checkbox.
Step 4
To add a default value, click on the "Write code" option and select the Employee_Created.
In the code designer, do the following coding:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.LightSwitch;
namespace LightSwitchApplication
{
public partial class Employee










Peter WalterPosted Aug 26, 2015, 11:19 AM
Thanks for the above solution. I have implemented this and now the sort order on the datetime column does not work. Do you know how to restore the sort order now ? I am using lightswitch 2011. Many thanks