473,473 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DataBinding

Hi all,

I have a main form with a datagrid and an edit button. When i click the
edit button, see code below:
If Me.dataset.table.Rows.Count > 0 Then
Dim select As Integer
select = Me.datagrid.Item(Me.datagrid.CurrentRowIndex(), 0)
'the zero above is the columnstyle in the datagrid which is the primary
key of my 'table.
Dim frmNewEdit As New frmAddEdit
frmNewEdit .Incoming = select
'Incoming is the property that sets whether we want to add or edit
frmNewEdit .ShowDialog()
'after i click submit it comes back here
Me.dataset.Clear()
Me.adapter.Fill(Me.dataset.table)
Me.datagrid.Refresh()

And the form with all the textboxes with the data opens. The textboxes
are all bind to the dataset (set at the properties window - Data
Bindings).
When I delete the data from a textbox and move to the next textbox, the
value that was previously typed it reappears again.

How do i avoid that? In some cases, I need the textboxes to be empty.
If there was data already there, and i click edit to remove that value,
the value reappears again.
The code in the edit Form when i click submit is the following:

Me.BindingContext(Me.datasetEdit.table).EndCurrent Edit()
Me.adapterEdit.Update(Me.datasetEdit.table)

Is it maybe the load method of the edit Form? The code is the
following:

Me.adapterEdit.SelectCommand.Parameters("fcpk").Va lue = Me.Incoming
' fcpk is the primary key which is found in the columnstyle which has
the value '0
Me.adapterEdit.Fill(Me.datasetEdit.table)

Also, the edit Form has tabs and groupboxes and the textboxes are
within those

Thanks

Savvas

Aug 25 '05 #1
0 1566

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
3
by: John Bailey | last post by:
When I first built a few web pages in ASP .Net 2.0, I thought it was great. The formview and detailview contorls would automatically layout the controls for you, the update methods were...
4
by: Nathan Sokalski | last post by:
I have two databinding expressions (the first & last names from a DB) that I want to assign to the text property of a Label so that the result is LASTNAME,FIRSTNAME. At the moment, I have the...
9
by: Dennis | last post by:
I have tried using Databinding for my application but always seem to find it very restrictive (maybe I don't completely understand it enough). I always seem to find it much easier to display a...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
0
by: Wayne Sepega | last post by:
I have the following Object DataSource <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetCustomer" TypeName="Customers" DataObjectTypeName="Customer"...
9
by: J055 | last post by:
Hi I have a very simple configuration of the GridView with paging and sorting. When I do a postback the DataBinding event fires twice - in both the ProcessPostData and PreRender stages of the...
1
by: CorporateCoder | last post by:
Hi, I am trying to bind the selected value of a databound dropdown box in a databound gridview control to the value being displayed in the template column the dropdown box has been added to. ...
8
by: Dirk | last post by:
Hello, I have a problem to use databinding with my business layer classes. My data class does not have simple properties (string, int or datetime), instead, all my properties are objects of the...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello to all, I want to know if DataBinding in asp.net 2,0 is better than to fill up the values of the controls of the following form: this.miControlTextBox.Text = valorParaControlTextbox; ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.