473,809 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BindingContext problem (Maybe)

I have a strange problem. In my form there is a grid(dgBC) and there
is one checkBox column who is editable. When i make a change on a row,
i must select another row, if i don't the changes will not be saved.

Any idea ??

Thx
DoOmX

(I shrink the code because there is to much class involved)
=============== =============== =========
In the Form :
---------------

Private _estimation As CDataEstimation = Nothing

Me._estimation = New CDataEstimation (key, Nothing, Me.BindingConte xt,
Me._cnx)

Dim dv As DataView = Me._estimation. Table.DefaultVi ew
dv.AllowNew = False
dv.AllowEdit = True
dv.AllowDelete = False

Me.dgBC.DataSou rce = Me._estimation. Table

=============== =============== =============== ====
Class CData (Base)
------------------
Protected Sub New(ByVal instSelect As String, ByVal posCh As
EventHandler, _
ByVal contexte As BindingContext, ByVal cnx As
CConnexion)

Me.m_cnx = cnx
Me.m_dt = New DataTable
Me.m_adap = New OleDbDataAdapte r(instSelect, cnx.ConnexionSt ring)

Me.m_adap.Fill( Me.m_dt)
Me.m_lien = New CDbLiaisons(con texte.Item(m_dt ), posCh, m_adap)
Me._contexte = contexte
End Sub
=============== =============== =============== ====
Class CDataEstimation
---------------------
Private Const sql As String = "Select * from Projets_Est_P where
pepNoProj = {0}"

Public Sub New(ByVal noProjet As Integer, ByVal posCh As EventHandler,
ByVal contexte As BindingContext, ByVal cnx As CConnexion)
MyBase.New(Stri ng.Format(sql, noProjet), posCh, contexte, cnx)

End Sub

Note Cdbliaison is a perfect Class (Tested by more than 150 persons)
so there is no Bugs there.
Nov 21 '05 #1
0 859

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

Similar topics

0
2062
by: zee | last post by:
Hi, Could anybody please tell me why my web application refuses when I use BindingContext. I am selecting from a database and if (this.BindingContext.Count==0) Server.Transfer("Anotherpage.aspx"); SO that it goes to another page if there were no records meeting the select criteria but the error I get is C:\Inetpub\wwwroot\FrontPage\Result_id_search.aspx.cs(157):
0
1908
by: Peter | last post by:
Hi, I'm developing a program in MDI style I've got 2 froms MDIForm (parent form) Form2 (child form with dataGrid1 and myDataSet)
1
3323
by: D. Yates | last post by:
Hi, I retrieved the employee table from the Pubs database into a single dataset called, dataSet12. I dropped two textbox controls and a datagrid control onto the same form and bound the controls at design time to dataSet12's employee table. Now I want to move through the data by pressing a button.... This code will change the data in the text boxes: this.BindingContext.Position += 1;
1
1350
by: Joe Reggae | last post by:
Hello, I'm a little weak in understanding concepts surrounding currency and binding context and appreciate advice in getting some grids to bind (in sync) to three related tables. Specifically, I have three tables with one-to-many relations defined in my dataSet from parent to child and from child to grandchild. To that are bound three datagrids ...
0
1827
by: Nathan Carroll | last post by:
Attempting to eliminate flicker showing (form) and hiding seems to have no effect as I have it below. if I move the lines: Me.Show() Me.ShowInTaskbar = True f.Close() to the end of the load procedure the flicker goes away and produces effects that destroy my multiple binding scheme. This Line: Me.CurrentDate.Text = CStr(Now) is has a problem with
1
7575
by: Edwin | last post by:
Hi, I created a dataform with the data form wizard which created some textboxes and 1 checkbox. When I add a row (see section "Add Row" for code) the newly added is not accessible. A label "lblNavLocation" generated by the wizard shows that a row has been added but I can not navigate to it. See section "PositionChanged" for code.
0
1090
by: Donald | last post by:
Mostly, I get the currencymanager from the form.bindingcontext property. but I found that I can aslo get the same currencymanager from a textbox.bindingcontext, even though this textbox does not have any bindings assoicated with this control. Why? // form currencymanager cm1 = (CurrencyManager) this.bindingcontext // textbox currencymanager, In fact, textbox1 does't have any databindings. cm2= (CurrencyManager)...
0
1399
by: nina98765 | last post by:
Hi all I have a data-bound Windows form bound to a strongly-typed dataset. Upon opening the form, I would like to Find a specific record based on a parameter I've passed to the form, and display the data in the appropriate textboxes, etc. I would also like to have the entire table opened (i.e., not just the one record I've found) as I would like to navigate through the records My table is called "AP_TBL_Vendors. The problem is that I...
6
12144
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use binding like normal. The problem I am running into is that my UserControl ends up with a different BindingContext then the ParentForm it is contained in and thus all other controls on the parent form. (I want various controls on the form to...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9602
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10639
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10120
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7661
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.