Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics 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 May 31st, 2008, 10:16 AM
Registered User
 
Join Date: May 2008
Location: Reston, Virginia, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple views of single table

I have a GridView and a DetailsView of a single MS 2005 SQL table on a page. Each view has their own SQLDataSource. When I update a row of the table using the DetailsView, the GridView is not refreshed with the new data, even after several Page_Loads. How do I trigger a refresh of the Gridview?

Joe
 
Old June 2nd, 2008, 01:34 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the DetailsView Update event just write the following code:

 GridView1.DataSourceID = SqlDataSource1.ID;

ie (sqlDatasource of gridview).





Similar Threads
Thread Thread Starter Forum Replies Last Post
2 table views in DropDownList control yukijocelyn ASP.NET 2.0 Basics 31 October 1st, 2007 10:16 PM
Multiple views of Thread postings psrkumar BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 February 16th, 2007 04:21 PM
multiple views cbodapati All Other Wrox Books 0 December 10th, 2005 05:31 AM
converting Access 2000 views to Sql views matta Classic ASP Professional 1 January 26th, 2005 03:37 PM
Concatenate multiple records from table to single Ron Howerton SQL Language 6 August 23rd, 2004 08:49 AM





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