SunQuest
 
           .NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old October 12th, 2001, 09:44 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Databinding - ITEMTEMPLATE problem

Originally posted by : Gerard Mark (gerard@cosmoweb.net)This problem surfaced when I added 3 or more panels to the same webform. The page starts with 'panel1' as the only visible panel which contains a datagrid with an itemtemplate. Panels 2 & 3 are made visible when you click on the links at the top of the page. If I click on Panel 2 and then Panel 3 & then back to Panel 1, the datagrid in 'panel1' looses its data. If I click on Panel 2 and then Panel 1 , or click Panel 3 and the return to Panel 1, I don't have that problem. What's wrong here. See code below.Gerardgerard@cosmoweb.net '************************************************* ****** Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) If Not Page.IsPostBack then Dim DataConn As OleDbConnection Dim oDS As New DataSet() DataConn = NewOleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:ProgramFilesMicrosoft OfficeOfficeSamplesNorthwind.mdb;Persist SecurityInfo=False")DataConn.Open()Dim da As OleDbDataAdapterda = New OleDbDataAdapter("Select * from Categories",DataConn) da.Fill(oDS, "Categories") DataGrid1.Datasource = Ods.Tables("Categories").defaultviewDataGrid1.DataBind()DataConn.Close() End if End Sub Public Sub showPanel1(sender As Object, e As EventArgs) Panel2.Visible = False Panel3.Visible = False Panel1.Visible = True End Sub Public Sub showPanel2(sender As Object, e As EventArgs) Panel1.Visible = False Panel3.Visible = False Panel2.Visible = True End Sub Public Sub showPanel3(sender As Object, e As EventArgs) Panel1.Visible = False Panel2.Visible = False Panel3.Visible = True End Sub Databinding Example Panel 1 Panel 2 Panel 3 This is panel 2! This is panel 3!

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Databinding - ITEMTEMPLATE problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway