on 12-05-2013 8:13 AM
Hi all,
I have a matrix in that, to add a new/ next row i call the add row menu but i need the row to add automatically by simply pressing the TAB key.
How should i do that??
Help me solving this issue.
Regards,
Jananisuba S
Hi Jananisuba,
If you want to add Row in matrix ob pressing TAB key you can refer following code. It works
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.CharPressed == 9 && pVal.ItemUID == "matStd" && pVal.ColUID == "V6")
{
oForm = clsAddOn.LDNA_Application.Forms.GetForm("CBF_SCE", pVal.FormTypeCount);
int i = oMat.VisualRowCount;
if (oMat.Columns.Item("V6").Cells.Item(i).Specific.Value != "" )
{
BubbleEvent = true;
SAPbouiCOM.DBDataSource dbData = default(SAPbouiCOM.DBDataSource);
dbData = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item(1);
dbData.Clear();
oMat.AddRow();
oMat.Columns.Item("V0").Cells.Item(pVal.Row + 1).Specific.Value = pVal.Row + 1;
oMat.Columns.Item("V1").Cells.Item(pVal.Row + 1).Click(SAPbouiCOM.BoCellClickType.ct_Regular);
}
}
-Thanks and regards
vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jananisuba,
Catch the after BoEventTypes.et_KEY_DOWN event, check that the key pressed was tab and then call the matrix/grid add row method.
You can also add your conditions for the adding of the row on the KeyDown event (e.g.: only add the row if we are on the correct column).
Best regards,
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.