on 02-08-2012 6:32 AM
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.
Hi Harley,
What type of datasource is your matrix bound to (ie DBDataSource, UserDataSource or DataTable)? It's normally better to write your data to the datasource rather than the matrix cells (the only exception being system forms).
Kind Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have not used RecIndex in your loop. I believe RecCount is a fixed value. That will not going to work.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.