Results 1 to 2 of 2

Thread: changing datatables for itemsource causes exception

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2012
    Posts
    136

    changing datatables for itemsource causes exception

    I'm quite new to WPF and the datagrid control and it has been a hard slog learning it (quite different from the datagridview!)

    I've been googling all morning but can't find an answer yet. I have a datatable assigned to the ItemsSource and it works great but later on I redo the query and try to change to a new version of the table. It crashes right away and saying something about a block variable not being set (or something close to that). I tried setting ItemsSource to "" and Nothing but that too causes exceptions.

    How does one set the Datagrid to a new itemsource?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    109,990

    Re: changing datatables for itemsource causes exception

    Show us the code and the exception stack trace.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width