Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to load large data to multiple filtered combobox's

How to load large data to multiple filtered combobox's

Scheduled Pinned Locked Moved C#
wpfhelpcsharparchitecturetutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sevententh
    wrote on last edited by
    #1

    Hi, I'm after some suggestions on best practice to resolve an issue of loading large data combobox's (WPF). I have two combo's Country & Airport. Country combo is to filter Airport combo (with just Airports in that Country) simple... There are approx 260 Countries and 10,000+ airports worldwide Using MVVM

    public viewmodelFlights()
    {
    CountryList = new List<CountryModel>(wcfService.GetCountries());
    AirportList = new List<AirportModel>(wcfService.GetAirports());

    icCountryView = CollectionViewSource.GetDefaultView(CountryList );
    icCountryView.CurrentChanged += new EventHandler(icCountryView_CurrentChanged);
    icCountryView.MoveCurrentToPosition(-1);

    icAirportView = CollectionViewSource.GetDefaultView(AirportList );
    icAirportView.CurrentChanged += new EventHandler(icAirportView_CurrentChanged);
    icAirportView.MoveCurrentToPosition(-1);
    }

    just so you get the vm idea :-D I'm trying to get this initial loading quicker. Is there anyway to only load the airports once the Country has been selected? I have a bigger problem with a hospital list which has 1,000,000+ records!!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups