Skip to Content
0
Former Member
Feb 11, 2009 at 06:03 PM

Problem to handle matrix, UDO, Datasource (add and delete row)

475 Views

Hello,

We are working on a development to add a form of document type to SBO.

This form is composed of a head of document and of a matrix.

We are using an UDO of Document Type with a table "Document" and a table "Document Lines".

The form is bound with th Document Table and a matrix (object on the form) is bound with the table Document lines.

Form is automanaged

Matrix : single select mode

We did look for solution on th forums, but we did not find any solutions to our troubles.

We have the following troubles :

1- When we are using matrix.AddRow(), it doesn't create an empty line but duplicate the last line. We have to clear the new line manually. Is it possible to add an empty row or a new line with the default value in the database (in this case, Document lines table)?

2- When we delete rows from the right click menu, the lines are deleted on the matrix and when we validate the deletion by clicking on the form's update button, the deleted lines are replaced by empty lines.

eg : we have a document with 10 lines

- we delete 5 rows on the matrix from the right click menu -> the lines disappear from the matrix

- we click on update button

- the matrix is reloaded -> 5 new lines have been added with DB fields default values.

We tried FlushToDataSource method to synchronize matrix with database, we got the same problem.

It seems to be the same problem than matrix row deletion

Thank you for your help.

Xavier.

Edited by: Xavier DEFINANCE on Feb 11, 2009 7:03 PM