I have this Toatal Rev column in gridview which has 7 - 79 decimal value e.g 62416.666666667. I would love to approximate the values to 2 decimal value e.g 62416.67. Please this is different from the former example i posted because this example does not uses jquery, it load directly to the gridview by binding the data
My Codeplease help me sir
<asp:GridView ID="avDetails" runat="server" AutoGenerateColumns="False"
Font-Names="Arial Narrow"
Font-Size="13px" DataKeyNames="pid" OnSorting="OnSorting" AllowSorting="True" OnRowDataBound="OnRowDataBound"
Width="100%" Style="margin-bottom: 0px"
CssClass="grid" CellPadding="2" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="no" HeaderText="BASE NO" SortExpression="no" />
<asp:TemplateField
HeaderText="PROD CODE"
SortExpression="pid">
<ItemTemplate>
<%# Eval("pid")%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="posino" HeaderText="POSI NO" SortExpression="posino" />
<asp:BoundField DataField="description" HeaderText="DESCRIPTION" SortExpression="description" />
<asp:BoundField DataField="colour" HeaderText="COLOUR" SortExpression="colour" />
<asp:BoundField DataField="deliverydate" HeaderText="RECEIVED" SortExpression="deliverydate" />
<asp:BoundField DataField="supplier" HeaderText="SUPPLIER" SortExpression="supplier" />
<asp:BoundField DataField="totalrev" HeaderText="TOTAL REV" SortExpression="totalrev" />
<asp:BoundField DataField="screen" HeaderText="SCR/ANG" SortExpression="screen" />
<asp:BoundField DataField="depth" HeaderText="DEPTH" SortExpression="depth" />
<asp:BoundField DataField="circumference" HeaderText="CIRC" SortExpression="circumference" />
<asp:BoundField DataField="" HeaderText="STATUS" />
<asp:TemplateField HeaderText="USE">
<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" OnCheckedChanged="OnChckedChanged" AutoPostBack="True" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>