0

I have designed a silverlight application using Visual Studio Lightswitch. I added a screen that shows the details screen. Looked at the code behind and tried to add.

partial void Application_initialize()
        {
            this.Details.ClientTimeout = 1000;
        }

An error came out that it does not contain a definition for ClientTimeout and no extension method. My intention is to maintain a connection to my database and display the data in a details screen always.

How can maintain the connection even when idle?

Also the details was showing only 52 records instead of more 1000 records.

4

1 に答える 1

0

You need to add that code in the Application.cs file, not in a screen's code.

The easiest way to get there is:

  • right-click on the LightSwitch project in Solution Explorer
  • select View Application Code (Client)

You sure it wasn't showing 45 records? By default, the query source for a grid has paging set to on, & the number of items set to 45 per page. If you look down at the bottom of the screen, there should be a page control, that allows you to move from page to page.

To set paging off, or to change the number of items per page, in the top left of the screen designer, click on the screen query, then over on the right-hand side of the designer you'll see some checkboxes. One of them is Support Paging. If that box is ticked, there'll be a textbox underneath it (which disappears if you uncheck the box), with the number of items per page.

Paging Options

于 2012-10-20T09:12:27.080 に答える