Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 Databases by Thearon Willis; ISBN: 9780764588945
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 23rd, 2007, 02:17 PM
Registered User
 
Join Date: Jan 2007
Location: , , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 7 - List Views Not Refreshing

Hi,

Can anyone help, I have completed Chapter 7 so that i can add, update & delete projects and Groups.

That works fine, however the list views (lvwProjects & lvwGroups) do not re-load the data after an update or delete. When i click on the updated record it displays the updated version in the text boxes but the list view continues to show the pre-updated version.

The methods that update and delete call the LoadGroups/LoadProjects procedure on completion, and that contains a lvwGroups.items.clear, so I cannot understand why it does not show the updated version.

Can anyone give me some ideas?

Thanks
Reply With Quote
  #2 (permalink)  
Old January 27th, 2007, 05:59 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Hi,

Is the last line of code in the Add, Update, and Delete procedures for each of these a call to the LoadProjects or LoadGroups procedures? If so, then set a breakpoint on those lines and ensure that you are indeed getting to those procedures and see what is happening in those load procedures.

Thearon
Reply With Quote
  #3 (permalink)  
Old January 31st, 2007, 06:18 PM
Registered User
 
Join Date: Jan 2007
Location: , , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Thearon,
Thanks for the reply.

I have stepped through the code from the point it calls the loadProjects/Loadgroups procedure and it calls the 'lvwGroups.items.clear' without error, but still does not reload the data in the list view, but retains the pre-modified data.

Could this be a bug in the listview control? (I have installed Sp1 for VS2005)
Can you give me another way to clear the data and reload into the list view?
This is not a big problem and is not stopping me from progressing through your book, but it is somewhat puzzling

Cheers



Reply With Quote
  #4 (permalink)  
Old January 31st, 2007, 07:26 PM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

The ListView control should clear without any problems. May I suggest that you download the code from the Wrox website for this book and compare those load procedures with your own. That may help point out any potential discrepancies in your code.

Thearon
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 - Two Views, not working for me... bigtalk BOOK: Beginning Ruby on Rails 1 January 3rd, 2008 06:30 AM
converting Access 2000 views to Sql views matta Classic ASP Professional 1 January 26th, 2005 02:37 PM
refreshing XML withour refreshing the page sasidhar79 XML 1 January 12th, 2005 04:16 AM



All times are GMT -4. The time now is 12:04 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.