on 11-25-2009 11:16 AM
hi everyone....
i have a user form. where for one editbox (uid 9) i am feeding data from one more form (sub form) which i have designed by taking a grid and 2 buttons(ok and cancel) and in that grid iam getting data from DB by writing simple query......
now in my user form when i click on tab on my editbox(i.e uid 9) my subform is opening with data in grid...
i want to select data from that grid onto my editbox.....how will i get this .....
Hi Sultana (raj),
capture the item event of the grid form when you press the ok button, take a variable store the selected value into this and pass this value to the edittext box.
it will work.
regards
shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
catch the event of click of your grid, so
declare a form variable and get your other form, something like this
SUBFORM
Form oForm = B1Connections.theAppl.Forms.GetForm("FORM TYPE", 0);
EditText oEdit;
oEdit = (EditText)oForm.Items.Item("EDIT TEXT").Specific;
oEdit.Value = "value "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
-
>> this is the code for assigning data to the grid datatable
Dim oGrid As SAPbouiCOM.Grid
oGrid = Me.m_SBO_Form.Items.Item(enControlName.Grid).Specific
oGrid.DataTable = Me.m_SBO_Form.DataSources.DataTables.Item("TEMPDATA")
-
>> Below is the event where you can get the values from grid to a variable
Case SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK
Dim itmcode As String = oGrid.DataTable.GetValue(0, pval.row)
-
>> This code is for transferring the value from variable to your main form...
form.Items.Item("7").Specific.value = itmcode
Hope it helps
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
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.