Hello,
I am using client-side binding grid, so all my columns are gridtemplatecolumn type and filled from web-service.
One of the columns is a result of some calculation.
When I put SortExpression="(END_DAY_DATA.IO_PER_SECOND - START_DAY_DATA.IO_PER_SECOND)" into third column - I am getting the exception when trying to sort by this column.
I can't believe I can't solve this problem in a more elegant way than writing something like:
SELECT
END_DAY_DATA.IO_PER_SECOND,
START_DAY_DATA.IO_PER_SECOND
END_DAY_DATA.IO_PER_SECOND - START_DAY_DATA.IO_PER_SECOND
........
and putting SortExpression="3" for third column! :(
UPDATE: Lack of time for experiments: so, I've used the last approach: SortExpression="3" :)
I am using client-side binding grid, so all my columns are gridtemplatecolumn type and filled from web-service.
One of the columns is a result of some calculation.
<telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra' HeaderText="Start day throughput" SortExpression="START_DAY_DATA.IO_PER_SECOND"> <itemtemplate> <asp:Label ID="StartPerSecond" runat="server" /> </itemtemplate></telerik:GridTemplateColumn><telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra' HeaderText="End day throughput" SortExpression="END_DAY_DATA.IO_PER_SECOND"> <itemtemplate> <asp:Label ID="EndPerSecond" runat="server" /> </itemtemplate></telerik:GridTemplateColumn><telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra' HeaderText="Throughput growth"> <itemtemplate> <asp:Label ID="PerSecondDelta" runat="server" /> </itemtemplate></telerik:GridTemplateColumn>When I put SortExpression="(END_DAY_DATA.IO_PER_SECOND - START_DAY_DATA.IO_PER_SECOND)" into third column - I am getting the exception when trying to sort by this column.
I can't believe I can't solve this problem in a more elegant way than writing something like:
SELECT
END_DAY_DATA.IO_PER_SECOND,
START_DAY_DATA.IO_PER_SECOND
END_DAY_DATA.IO_PER_SECOND - START_DAY_DATA.IO_PER_SECOND
........
and putting SortExpression="3" for third column! :(
UPDATE: Lack of time for experiments: so, I've used the last approach: SortExpression="3" :)