The CJ databinding implementation is half-baked (for example, it doesn't support VB6 datasource classes), so I don't recommend using it unless you are setting the datasource property directly to a ADO recordset connected to an MS Access database (another forum member has reported probems using databinding with ADO<MSSQL). Try it with your current data stack and if it doesn't work right away, don't fight with it for too long! Switch to using VirtualMode and your own update handling (more work, but it will save you time and pain in the long run).
However, if you are using ADO<MSACCESS and you are using the CJ sample for reference, there is a problem that you should be aware of. If you want your in-grid edits to be saved to the underlying database, you will have to modify the sample as follows:
1) Allow editing in the Form_Load event:
Me.wndRecords.AllowEdit = True
|
2) Open your recordset as a KeySet with BatchOptimistic locking by modifying the beginning of the ShowRecords sub as follows:
Private Sub ShowRecords(Table As String) ' show records If Rs.State = adStateOpen Then Rs.Close Rs.Open "select * from [" & Table & "]", Con, adOpenKeyset, adLockBatchOptimistic, adCmdText ' EVERYTHING UNDER RS.OPEN IN EXISTING SHOW RECORDS SUB REMAINS THE SAME
|
3) Replace the ValueChanged event to update the underlying recordset as follows:
Private Sub wndRecords_ValueChanged(ByVal Row As
XtremeReportControl.IReportRow, ByVal Column As
XtremeReportControl.IReportColumn, ByVal Item As
XtremeReportControl.IReportRecordItem) If Not wndRecords.Navigator.CurrentFocusInHeadersRows Then ' body row wndRecords.DataManager.UpdateRecord Item.Record Rs.UpdateBatch End If End Sub
|
Re-run the sample and your data modifications should now persist.
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|