Skip to Content
0
Former Member
Dec 05, 2006 at 05:44 PM

Msg "Changes will cause the data to be deleted" after adding folder

32 Views

Hi,

I'm developed one add-on what it consists in one new folder on the form AR Invoice. In this folder exists one Matrix what load some fields by my user table. My problem it occurs when it's open this folder and begin the to navigate for records through by Menus Button (First Data Record, Previous Record, Next Record, Last Data Record ) on the top menu.

They see my code by matrix creation:

private void InitializeComponents()

{

//Insira o Código para alterar o formulário aqui

try

{

this.oForm.Freeze(true);

oItemN = oForm.Items.Item("8") ;

oItem = oForm.Items.Item("2013");

this.oItemFolder = oForm.Items.Add("folderRPS", SAPbouiCOM.BoFormItemTypes.it_FOLDER);

oItemFolder.Top = oItem.Top;

oItemFolder.Height = oItem.Height;

oItemFolder.Width = oItem.Width;

oItemFolder.Left = oItem.Left + oItem.Width;

SAPbouiCOM.Folder folderRPS = (SAPbouiCOM.Folder)this.oItemFolder.Specific;

folderRPS.Caption = "NF-e SP";

folderRPS.GroupWith("2013");

oItemUm = oForm.Items.Item("38");

this.oItemMatrix = oForm.Items.Add("matrixRPS", SAPbouiCOM.BoFormItemTypes.it_MATRIX);

oItemMatrix.Top = oItemUm.Top;

oItemMatrix.Height = oItemUm.Height;

oItemMatrix.Width = oItemUm.Width;

oItemMatrix.Left = oItemUm.Left;

SAPbouiCOM.Matrix matrixRPS = (SAPbouiCOM.Matrix)this.oItemMatrix.Specific;

oColumns = matrixRPS.Columns;

oColumn = oColumns.Add("flagNumRPS", SAPbouiCOM.BoFormItemTypes.it_EDIT);

oColumn.TitleObject.Caption = "Número";

oColumn.Width = 10;

oColumn.Editable = false;

oColumn = oColumns.Add("flagSRPS", SAPbouiCOM.BoFormItemTypes.it_EDIT);

oColumn.TitleObject.Caption = "Série";

oColumn.Width = 10;

oColumn.Editable = false;

oColumn = oColumns.Add("flagTRPS", SAPbouiCOM.BoFormItemTypes.it_EDIT);

oColumn.TitleObject.Caption = "Tipo";

oColumn.Width = 10;

oColumn.Editable = false;

oDBDataSource = oForm.DataSources.DBDataSources.Add("@FLAG_NFESP");

oColumn = oColumns.Item("flagNumRPS");

oColumn.DataBind.SetBound(true, "@FLAG_NFESP", "U_flagNumRPS");

oColumn = oColumns.Item("flagSRPS");

oColumn.DataBind.SetBound(true, "@FLAG_NFESP", "U_flagSerieRPS");

oColumn = oColumns.Item("flagTRPS");

oColumn.DataBind.SetBound(true, "@FLAG_NFESP", "U_flagTipoRPS");

matrixRPS.Clear();

matrixRPS.AutoResizeColumns();

oDBDataSource.Query(null);

matrixRPS.LoadFromDataSource();

oItemMatrix.FromPane = 5;

oItemMatrix.ToPane = 5;

this.oForm.Freeze(false);

}

catch (Exception ex)

{

oConnection.Application.MessageBox(ex.Message, 1, "Ok", "", "");

}

}

Always what me click in this menu items, I received the following message:

System Message

Changes will cause the data to be deleted.

How to make to remove this message when sailing for the records?

Please, help me.

Fred.

Message was edited by:

Trinidad Martinez

I have changed the subject