on ‎2025 Mar 14 10:34 AM
private void OnCustomInitialize()
{
oForm = (SAPbouiCOM.Form)sbo_app.Forms.ActiveForm;
if (oForm.DataSources.DataTables.Count == 0)
{
dt = oForm.DataSources.DataTables.Add("dt");
}
else
{
try
{
dt = oForm.DataSources.DataTables.Item("dt");
}
catch
{
dt = oForm.DataSources.DataTables.Add("dt");
}
}
string query = "SELECT u_t001 FROM [@itemproperties2]";
dt.ExecuteQuery(query);
Matrix0.Clear();
SAPbouiCOM.Column column = Matrix0.Columns.Item("cl_a");
column.DataBind.Bind("dt", "u_t001");
Matrix0.LoadFromDataSource();
if (Matrix0.RowCount > 0)
{
Matrix0.SelectRow(1, true, false);
}
}
I want to ask how to set martix to load data when it is opened? I set up the data source and bind data to the corresponding column, why is it not automatically loaded when it is opened, or why is it not displayed?
Request clarification before answering.
Hello,
Try to change the way you bind the matrix column to the datasource:
column.DataBind.SetBound(true, "dt", "u_t001");
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Try to change the way you bind the matrix column to the datasource:
column.DataBind.SetBound(true, "dt", "u_t001");
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.