Skip to Content
0
Feb 08, 2012 at 06:32 AM

Problem AddRow in Matrix

25 Views

Execute the following code to add rows in a matrix.

for (int RecIndex = 0; RecIndex <= RecCount - 1; RecIndex++)
                    {
                        oMatrix.AddRow(1, oMatrix.RowCount);
                        string coluna = rec.Fields.Item(0).Value.ToString();
                        string descricao = rec.Fields.Item(1).Value.ToString();
                        ((SAPbouiCOM.EditText)oMatrix.Columns.Item("V_0").Cells.Item(oMatrix.RowCount).Specific).Value = coluna;
                        ((SAPbouiCOM.EditText)oMatrix.Columns.Item("V_1").Cells.Item(oMatrix.RowCount).Specific).Value = descricao;
                        rec.MoveNext();
                    }

The problem is that the values ​​are added to the matrix problems. Sometimes it adds value in a row, and sometimes the line with preeche blank.

In other words, is created in the amount of matrix rows according to the For, but many line are not satisfied with the values ​​passed.