Blog Archives

How to export grid data as excel in LightSwitch Web Application


Someone recently asked me how to export LightSwitch grid to excel format. Well sounds easy in Desktop Mode coz there is inbuilt option when you publish application in Desktop mode but what about when application is published as web app?

Posted in LightSwitch,

How to call StoredProcedure in LightSwitch for custom search screen validation


I recently came across requirement where user asked to perform complex validation before query is fired to return search screen data. So here is my code snippet you can call inside yourqueryname_ProcessQuery Create stored procedure for validation First thing we

Tagged with: ,
Posted in .net, LightSwitch,

How to provide custom button for search in LightSwitch


Recently someone asked me how to change default LightSwitch behavior for Search screen. Which is press enter for search. But what if you want to provide Button which user can Press to search data? Here is step-by-step info on how

Tagged with: ,
Posted in .net, LightSwitch,

How to show delete confirmation in LightSwitch


If you want to ask user before deleting record then write the following code in your screen code editor. Namespace LightSwitchApplication Public Class EditableCustomersGrid Private Sub gridDeleteSelected_Execute() ' Write your code here. If ShowMessageBox("Are you sure you want to delete

Tagged with: ,
Posted in .net, LightSwitch,

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

Tagged with:
Posted in .net, LightSwitch,

How to allow comma seperated values for search parameter in LightSwitch


Recently someone asked me how to pass multiple values as search parameter in LightSwitch ? Well I tried to do some research and looks like there is no in-built control to select multiple items from Filter Dropdown. But after doing

Tagged with:
Posted in LightSwitch