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. WPF
  4. WPF DataGrid: Settings ItemsSource with large DataTable

WPF DataGrid: Settings ItemsSource with large DataTable

Scheduled Pinned Locked Moved WPF
wpfquestioncsharpdatabasewcf
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
    soup
    wrote on last edited by
    #1

    Hi, I have a query that returns a lot of records. What I have done to optimize the initial data bind when setting ItemsSource is to only show the first 100 records. However, I allow users to gain access to the remaining records by indicating there are more records and if they press a button, all the records are bound to the DataGrid. This setting of ItemsSource takes 10-15 seconds. I don't mind how long that takes, but I have a storyboard animation that I overlay to let the user know something is happening. This animation is fine whilst querying and binding 100 records (must be quick), but when binding 1000+ records, the animation doesn't run. I'm presuming this is because the binding and the animation are on the UI dispatcher thread, but this is kind of defeating my ability to keep the user in the loop in what is going on. Has anyone solved this issue, either by doing it right (am I doing something wrong?) or by doing it another way? Thanks for any advice. Simon

    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