Hi, Good night.
I want to recalculate the field (% Above Winner) when a new row is inserted/updated/deleted. I did the method (and it works) but when i put this method in a event of the same grid i got an error/debuggin visual studio warning. But if i put the method in other field (other tab etc, no in the same grid) it works.
Can you helpme please? i paste some images to explain me better.




public void getAboveWinners()
{
int countLowestValue=0;
decimal? lowestValue=0;
//we get the lowest value;
foreach (CEEstimateBidWinner soLine in this.viewCEEstimateBidWinner.Select())
{
if(lowestValue==0)
{
lowestValue=soLine.TotalBid;
}
else if(lowestValue>=soLine.TotalBid)
{
lowestValue=soLine.TotalBid;
}
}
foreach (CEEstimateBidWinner soLine in this.viewCEEstimateBidWinner.Select())
{
decimal? resultado=((soLine.TotalBid/lowestValue)-1)*100;
soLine.PercentageAboveWinner=resultado;
viewCEEstimateBidWinner.Update(soLine);
}
}
Can you help me please, thanks!