🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #474

TabControls & Saving to a Database

#474
From: RayG
Date: Tue, 28 Dec 2004 08:50
26 lines
1919 bytes
Hi

I have designed a database app using  a windows form and a tab control with 
comboboxes and edit controls on each tab control. The problem that I am 
having is with the edit form that I have created.

On the forms onload event handler I databind the controls on the various tab 
controls to the dataset for the selected record.

The problem comes when I save the record. If I haven't clicked on each tab 
page and I click on the "Save Changes" button the sql query only posts data 
for the controls in the tab pages that I have clicked on. The rest of the 
data for the rest of the controls are posted as blanks. It seems that the 
data is only populates the edit controls when the tab page becomes or is set 
as active.

This becomes a problem if the user only needs to edit data on the first tab 
page and not the rest.

Is there anyway that this can be changed or should I loop through the tab 
pages and set tabcontrols.SelectedTab each page to initialise the data...

Any suggestions or help will be greatly appreciated...

Thanks
Ray G 
Technical Details
Message-ID: <41d11e3f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,507a33c483242503,start
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "RayG" <ray@mweb.co.za>
Newsgroups: borland.public.csharpbuilder.language.csharp
Subject: TabControls & Saving to a Database
Date: Tue, 28 Dec 2004 10:50:20 +0200
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 196.2.155.76
Message-ID: <41d11e3f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104223807 196.2.155.76 (28 Dec 2004 00:50:07 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail