or
| <telerik:GridNumericColumnEditor ID="edtGross" runat="server" NumericTextBox-Type="Currency"> |
| <NumericTextBox ID="tbxGrossAmount" runat="server" /> |
| </telerik:GridNumericColumnEditor> |
| <telerik:GridNumericColumnEditor ID="edtNet" runat="server" NumericTextBox-Type="Currency"> |
| <NumericTextBox ID="tbxNetAmount" runat="server" /> |
| </telerik:GridNumericColumnEditor> |
| <telerik:RadGrid ID="grdAccountEntryList" runat="server" Skin="Sunset" DataSourceID="sqlAccountEntryList"> |
| <MasterTableView DataSourceID="sqlAccountEntryList" DataKeyNames="AccountEntryID" |
| AutoGenerateColumns="False" |
| AllowFilteringByColumn="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" |
| AllowAutomaticUpdates="True" AllowPaging="True" AllowSorting="True"> |
| <Columns> |
| <telerik:GridNumericColumn NumericType="Currency" DataField="GrossAmount" UniqueName="GrossAmount" HeaderText="Gross" DataType="System.Decimal" |
| Aggregate="Sum" DataFormatString="{0:c2}" ColumnEditorID="edtGross"> |
| </telerik:GridNumericColumn> |
| <telerik:GridNumericColumn NumericType="Currency" DataField="NetAmount" UniqueName="NetAmount" HeaderText="Net" |
| DataFormatString="{0:c2}" Aggregate="Sum" DataType="System.Decimal" ColumnEditorID="edtNet"> |
| </telerik:GridNumericColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title>Untitled Page</title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server" /> |
| <div> |
| <telerik:RadGrid runat="server" ID="grid" > |
| <MasterTableView AutoGenerateColumns="false" > |
| <Columns> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col1" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col2" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col3" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col4" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col5" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col6" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col7" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col8" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col9" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col10" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col11" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col12" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col13" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col14" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col15" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col16" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col17" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col18" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings> |
| <Resizing AllowColumnResize="true" /> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| </div> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| using System.Net; |
| using System.Collections.Generic; |
| using Telerik.Web.UI; |
| public partial class _Default : System.Web.UI.Page |
| { |
| protected override void OnLoad(EventArgs e) |
| { |
| base.OnLoad(e); |
| BindData(); |
| } |
| private void BindData() |
| { |
| DataTable table = new DataTable(); |
| table.Columns.Add("col1"); |
| table.Columns.Add("col2"); |
| grid.DataSource = table; |
| grid.DataBind(); |
| } |
| } |

