views:

14

answers:

1

Hello. I use ObjectDataSource and bind IEnumerable[Person] to my DevExpress GridView

class Person
{
   private int Id {get; set;}
   public string Name {get; set;}
}

At grid there are two columns Id,Name. I want new column "Sum", which is calculated by person object(aggragate by person). At asp.net I create new column and calculate its value at RowDataBound event. At winforms I don't see this event and other appr. So what should I do in this case. Where can I handle binding moment? Thanks

+1  A: 

You should make an unbound column in your GridView, then calculate its value using the CustomUnboundColumnData event.

SLaks