Hello
The routine ClearCurrentSelection has been defined in
UC_GLJournals.ManualCode.cs
UC_GLTransactions.ManualCode.cs
UC_GLAttributes.ManualCode.cs
and in
UC_GiftBatches.ManualCode.cs
UC_GiftTransactions.ManualCode.cs
And there it only holds the code:
this.FPreviouslySelectedDetailRow = null;
This routines are invoked from other classes in the following structure:
UC_GLBatches.ManualCode.cs
-> UC_GLJournals.ManualCode.cs
-> UC_GLTransactions.ManualCode.cs
UC_GLJournals.ManualCode.cs
-> UC_GLTransactions.ManualCode.cs
GiftBatch.ManualCode.cs
-> UC_GiftBatches.ManualCode.cs
-> UC_GiftTransactions.ManualCode.cs
The idea of this routine is a clean up of other parts of a dialog in cases the selection on the base tab has been changed and now there is no valid selection on the secondary tab (or a changed selection).
But
[]FPreviouslySelectedDetailRow = null is not sufficient in this case.[/:m]
[]The better choice is the routine SelectByIndex and the parameter -1 for "noRowSelected".[/:m][/list:u]
So I reccomend not to use
public void ClearCurrentSelection()
{
this.FPreviouslySelectedDetailRow = null;
}
but
public void ClearCurrentSelection()
{
gridUsedHere.SelectByIndex(-1);
}
So do not copy&paste the wrong ClearCurrentSelection routines ...
Best regards
Wolfgang