public static SAPbouiCOM.Grid AddGridAoFormulario(
            SAPbouiCOM.Form pForm
            , string pUID
            , int pLeft
            , int pWidth
            , int pTop
            , int pHeight
            , SAPbouiCOM.BoMatrixSelect pBoMatrixSelect
            , SAPbouiCOM.DataTable pDataTable)
        {
            SAPbouiCOM.Grid oGrid;

            SAPbouiCOM.Item oItem = pForm.Items.Add(pUID, SAPbouiCOM.BoFormItemTypes.it_GRID);
            oGrid               = ((SAPbouiCOM.Grid)(oItem.Specific));
            oGrid.Item.Left     = pLeft;
            oGrid.Item.Top      = pTop;
            oGrid.Item.Height   = pHeight;
            oGrid.Item.Width    = pWidth;
            oGrid.SelectionMode = pBoMatrixSelect;
            oGrid.DataTable     = pDataTable;

            return(oGrid);
        }
        public static SAPbouiCOM.Matrix AddMatrixAoFormulario(
            SAPbouiCOM.Form pForm
            , string pUID
            , int pLeft
            , int pWidth
            , int pTop
            , int pHeight
            , SAPbouiCOM.BoMatrixSelect pBoMatrixSelect)
        {
            SAPbouiCOM.Item   oItem;
            SAPbouiCOM.Matrix oMatrix;

            oItem = pForm.Items.Add(pUID, SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            if (pLeft > 0)
            {
                oItem.Left = pLeft;
            }
            if (pWidth > 0)
            {
                oItem.Width = pWidth;
            }
            if (pTop > 0)
            {
                oItem.Top = pTop;
            }
            if (pHeight > 0)
            {
                oItem.Height = pHeight;
            }



            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.SelectionMode = pBoMatrixSelect;
            return(oMatrix);
        }