Richard Waddell
Richard Waddell

Reputation: 151

Source: Dropdown is empty in LightSwitch Add Query

In solution explorer, when I
1. Right-click on a particular data source and click Add Query or
2. Right-click and open a query based directly on the data source

The designer screen comes up as normal but the Source: dropdown in the upper right corner is not only empty, it's invisible aside from the label, 'Source:'

(Note: If I right-click and open a query based on a derived query then the dropdown is fine.)

However, I discovered if I click on just the right place (and it varies wildly) to the right of Source:, somewhere within where the dropdown should be:
1. The rows appear in a window just below on the surface of the designer.
2 If I select a derived query then the dropdown is back to normal, with both the table and any derived queries appearing as they should.
3. If I select the table itself the dropdown is still invisible.

The common symptom seems to be that if the dropdown is supposed to show the table it's invisible. If it's supposed to show a derived query, it's fine.

This only happens for some tables, which are in ApplicationData. I know the problem has not always been there because I have added derived queries to at least one of these tables previously.

I don't have this problem with any tables from WCF RIA services, which may or may not be a clue.

Upvotes: 1

Views: 243

Answers (1)

Richard Waddell
Richard Waddell

Reputation: 151

I did find the problem:

I checked all my tables for the problem and there were only two, 'Jobs' and 'Lots'. The name length was the problem.

  1. I added a table named Dogs and the Source: dropdown was invisible when I tried to add a query to Dogs.
  2. I changed the name to MyDogs and everything works fine.
  3. I duplicated this behavior in a newly created LightSwitch application.
  4. I duplicated this behavior on onstallations of VS / LightSwitch on two separate computers.
  5. This bug must have been introduced since the VS 2012 release because I had added a query to Jobs before.

Upvotes: 2

Related Questions