Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2007, 03:17 PM
Registered User
 
Join Date: Jan 2007
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
 
Old January 27th, 2007, 06:59 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
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
 
Old January 31st, 2007, 07:18 PM
Registered User
 
Join Date: Jan 2007
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



 
Old January 31st, 2007, 08:26 PM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
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





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 07:30 AM
converting Access 2000 views to Sql views matta Classic ASP Professional 1 January 26th, 2005 03:37 PM
refreshing XML withour refreshing the page sasidhar79 XML 1 January 12th, 2005 05:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.