Matrix Load not saved Data
I have an UDO with Masterdata and Masterdata Lines.
Loading existing Data is ok and as well Adding a Record (not stored) will be shown in the Matrix.
But then Adding a Record to Masterdata Table , generate a Record into the Lines Table.
Know I want to show the Records, they are not stored at this time, in the Matrix.
But I have not found a solution to show the LinesTable Record to the Matrix.
IMatrix oMatrix = MatrixObject;
IDBDataSource Con1 = LinesDatasourceObject;
IDBDataSource ZCON = MasterDatasourceObject;
int count1 = Con1.Size; // = 1
int count2 = ZCON.Size; // = 1
int count3 = oMatrix.RowCount; //= 0
Are there any Ideas?
OK... know I get the Solution for it.
I try to understand the System Order Form. After Checking something in Sudio and have some test in the origin behavior I thought it could have something initializing the Lines... As I saw the Original Form... The Matrix will be initialized after inserting the Customer.
So in this case I build a temporary Docentry and pass this into the DBDatasource Lines. and make a reload to the Matrix... and this solve this issue...
IMatrix oMatrix = (Matrix)((IMatrixExt)this.Components["MTCount"]).Specific;
IDBDataSource Con1 = (IDBDataSource)((IDbDataSourceExt)this.Components["DBCON1"]).Specific;
IDBDataSource ZCON = (IDBDataSource)((IDbDataSourceExt)this.Components["DBZCON"]).Specific;
int count1 = Con1.Size;
int count2 = ZCON.Size;
Con1.SetValue("Code", 0, RecNum);
Con1.SetValue("LineId", 0, "1");