Hello,
I have a gridtemplate column that is a label, but the value is a decimal value and I need the column to sort it like a number and not text (it sorts it as text). I have read numerous posts and the online help but I don't understand exactly what I need to do in order to sort a gridtemplate column in this manner. I can sort the bound number columns just fine. Here is my grid column:
I have a gridtemplate column that is a label, but the value is a decimal value and I need the column to sort it like a number and not text (it sorts it as text). I have read numerous posts and the online help but I don't understand exactly what I need to do in order to sort a gridtemplate column in this manner. I can sort the bound number columns just fine. Here is my grid column:
<telerik:GridTemplateColumn DataField="TRANS_AMOUNT" HeaderText="Amount" UniqueName="TRANS_AMOUNT"
AllowFiltering="false" SortExpression="TRANS_AMOUNT" DataType="System.Decimal">
<HeaderStyle HorizontalAlign="Left" Width="65px" Wrap="False" Font-Size="Smaller" />
<ItemStyle HorizontalAlign="Right" Width="65px" Wrap="False" />
<ItemTemplate>
<asp:Label runat="server" ID="lblTransAmount" CssClass="NormalNarrow" Text='<%#DataBinder.Eval(Container, "DataItem.TRANS_AMOUNT") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>