fiogf49gjkf0d Hi,
I upgraded my SLX web to 7.5.4 and the code that I have for deletion in a grid is not working. The code is using Datakeys to get the record selected on the grid but after the upgrade I'm getting always the value 00000000-0000-0000-0000-000000000000.
Here is my code:
Int32 iSelRowIndx = grdTicketTests.SelectedIndex;
if (iSelRowIndx < 0) {
this.DialogService.ShowMessage("Please select a Test Number before continuing");
} else {
string tTestID = grdTicketTests.DataKeys[iSelRowIndx].Value.ToString();
Sage.Entity.Interfaces.IticketTest ticketTest = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.IticketTest>(tTestID);
if (ticketTest != null)
{
string tID = ticketTest.Ticketid;
Sage.Entity.Interfaces.ITicket ticket = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.ITicket>(tID);
ticketTest.Delete();
}
}
The datakeys property of the datagrid is set to Id.
What I have to change in 7.5.4 to have this code working?
Thanks.
|