none
Make Autocomplete use a column from a sql table as ItemSource

    Question

  • I have a sql database that has a table with city names (around 2000) I want to use this list for an autocomplete box in my xaml. So Far I had no problem connecting to this table by creating a Domain Service and an Entity model and dsplaying this in a dataGrid. The problem is that I seem to be able to get only the full table including The Id number... How can I get only the city names and use them for the autocomplete?
    Saturday, April 24, 2010 11:22 AM

Answers

  • You can filter the table down permamently by putting exclude attributes on the columns you don't need, but if you sometimes need the entire table that will not work for you. The other thing you can do is create a POCO class to be the entity just for the drop down. Regardless, if you are loading the data using RIA Services you need the key as well as the city names.

    Monday, April 26, 2010 8:45 AM

All replies

  • Anyone?
    Sunday, April 25, 2010 11:55 PM
  • You can filter the table down permamently by putting exclude attributes on the columns you don't need, but if you sometimes need the entire table that will not work for you. The other thing you can do is create a POCO class to be the entity just for the drop down. Regardless, if you are loading the data using RIA Services you need the key as well as the city names.

    Monday, April 26, 2010 8:45 AM