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.BindingContext,
Me._cnx)
Dim dv As DataView = Me._estimation.Table.DefaultView
dv.AllowNew = False
dv.AllowEdit = True
dv.AllowDelete = False
Me.dgBC.DataSource = 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 OleDbDataAdapter(instSelect, cnx.ConnexionString)
Me.m_adap.Fill(Me.m_dt)
Me.m_lien = New CDbLiaisons(contexte.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(String.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.