on 09-16-2018 11:34 PM
Hi Experts
I am trying to learn addon development, for that i have created a manual form which contains a matrix and some editbox.
My requirement is that when a user opens a form, he should be able to fill his own data In matrix and editbox.
I have created a user defined table and some user defined fields.
I am able to add the values entered by users on editbox to the udt and in database.
I want to know how can i enter the values in database and udt when user enters a value in matrix columns(by a button press event).
my matrix is editable and users are able to fill their own values in column.
here is my code....
oItem = oForm.Items.Add("matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
oItem.Height = 300;
oItem.Width = 500;
oItem.Top = 250;
oItem.Left = 250;
oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
oColumns = oMatrix.Columns;
oColumn = oColumns.Add("first", SAPbouiCOM.BoFormItemTypes.it_EDIT);
oColumn.TitleObject.Caption = "column1";
oColumn.Width = 100;
oColumn.Editable = true;
oForm.DataSources.DBDataSources.Add("OCRD");
oColumn = oColumns.Item("first");
oColumn.DataBind.SetBound(true, "OCRD", "CardName");
oColumn = oColumns.Add("second", SAPbouiCOM.BoFormItemTypes.it_EDIT);
oColumn.TitleObject.Caption = "column2";
oColumn.Width = 100;
oColumn.Editable = true;
oForm.DataSources.DBDataSources.Add( "OCRD" );
oColumn = oColumns.Item( "second" );
//Setting the datasource
oColumn.DataBind.SetBound(true, "OCRD", "CardCode" );
//adding two rows
oMatrix.AddRow(2, -1);
do let me know if my matrix creation is right or wrong ??
(// just two columns and two rows for eg)
my first column is not editable while the second one is editalble
. Is this the default behavior ????
Thank You
Ranu Vijay
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
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.