I have a template column in my grid. The text of this column is derived by feeding the auditor ID (which is part of the table which is the datasource of the grid) through a function in my code. This gives me the name of the auditor. The template column looks like this:
This works beautifully to fill my grid, but now I want to use the EnableHeaderContextMenu functionality. Works well for all the other columns (which are bound columns) but when I try to use it on this column I get an error stating "Expression cannot be null or empty".
I tried setting the groupByExpression in the <trt:GridTemplateColumn> to "ctl.GetAuditorDescr(AudrId)" but then I get an error stating "Invalid group by expression: 'Group By' clause missing".
How can I feed the AudrId, which is part of the datasource, through my GetAuditorDescr function and then group by those results?