Skip to Content
0
Former Member
Jan 17, 2009 at 01:18 PM

matrix binding problem

110 Views

Hi All,

I have a user defined object which is having document type tables attached and the data add/update/delete happens just fine on its own. it was taking really long time to populate the detail matrix with the output of a query so I changed the code to following code :

oForm.DataSources.DataTables.Add("ItemMat")
oForm.DataSources.DataTables.Item("ItemMat").ExecuteQuery("select docentry, linenum , itemcode from rdr1" )
oMat.Columns.Item("col_0").DataBind.Bind("ItemMat", "DocEntry")
oMat.Columns.Item("col_1").DataBind.Bind("ItemMat", "itemcode")
oMat.Columns.Item("col_2").DataBind.Bind("ItemMat", "LineNum")
oMat.LoadFromDataSource()
                                              

after this the matrix gets populated within no time but, the binding of column changes completely.

to add the document rows to table in backend, the columns have to be bound to their original columns in the database.

if I try to again provide the binding as

oMat.Columns.Item("col_1").DataBind.SetBound(True, "@UNTDDLN1", "U_SDNum")

it gives me 'Matrix line exists' error.

how can I again bind to the original table's columns?

thanks,

Binita