on 01-03-2015 6:43 AM
Dear All Experts,
I am trying to check some conditions in the matrix rows. If there are 10-20 rows all is fine. But if there is more than 100 Rows then my add-on works very slow.
How to resolve that ?
plz reply.
Regards
Hi Amit,
Please explain a bit:
1. Are you checking the condition Row by Row ? Also do you want to check Row by Row ?
2. Is it a user defined Form ?
Thanks & Regards
Ankit Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
For a test I have written it. you can use it accordingly:
private SAPbouiCOM.DBDataSource dBDataSourceChild;
dBDataSourceChild = oForm.DataSources.DBDataSources.Item("@ACTDETAILTABLE");
SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(enControlName.Matrix).Specific;
try
{
if (oMatrix.VisualRowCount > 0)
{
oMatrix.FlushToDataSource();
int count = dBDataSourceChild.Size;
for (int i = count - 1; i >= 0; i--)
{
string strCode = dBDataSourceChild.GetValue("U_Code", i).ToString().Trim();
string strName = dBDataSourceChild.GetValue("U_Name", i).ToString().Trim();
if (strCode == "" && strName == "")
{
dBDataSourceChild.RemoveRecord(i); // Write your own logic here.
}
}
oMatrix.LoadFromDataSource();
}
}
catch
{
throw;
}
Hope it helps.
Thanks & Regards
Ankit Chauhan
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.