cancel
Showing results for 
Search instead for 
Did you mean: 

How can I delete the last row of a Matrix

Former Member
0 Kudos

Hi All,

Does anyone know whether deleting the last row of a matrix controlled by a UDO child table gives problems? I have the strange effect that I cannot delete the very last existing row in the matrix, i.e. after updating the delete the last to-be deleted row comes back into my matrix !!

I give you a snippet of my code (function getSelectedRow gives the selected row in the matrix):

==

if (evnt.ItemUID.Equals(ViewConstants.Items.DELETEBUTTON))

{

if (evnt.EventType == BoEventTypes.et_ITEM_PRESSED)

{

if (evnt.BeforeAction)

{

form = BusinessOne.Application.Forms.Item(formUID);

mtx = (Matrix)form.Items.Item(ViewConstants.Items.MATRIX).Specific;

int numRow = getSelectedRow(mtx);

if (numRow != -1)

{

mtx.DeleteRow(numRow);

form.Mode = BoFormMode.fm_UPDATE_MODE;

}

Item btn = (Item)form.Items.Item(ViewConstants.Items.ADDBUTTON);

btn.Enabled = true;

}

}

}

==

Cheers,

Marcel Peek

Alpha One

Message was edited by: Marcel Peek

Message was edited by: Marcel Peek

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes, there is a problem to delete the last row.

It is fixed in version 2005.