select

Grid / Calculated Columns

Rate this demo: Feedback
Run example in: C# VB.NET Change Skin:
Vista
  • BlackBlack
  • DefaultDefault
  • ForestForest
  • HayHay
  • Office2007Office2007
  • OutlookOutlook
  • SimpleSimple
  • SitefinitySitefinity
  • SunsetSunset
  • TelerikTelerik
  • VistaVista
  • Web20Web20
  • WebBlueWebBlue
  • Windows7Windows7
Product IDProduct nameUnit priceUnits in stockTotal Price
Total products: 77 Total price: 2191.71All units in stock: 3117Total : 73019.85
Page size:
select
 77 items in 8 pages
1Chai18.0039702
2Chang19.0017323
3Aniseed Syrup10.0013130
4Chef Anton's Cajun Seasoning22.00531166
5Chef Anton's Gumbo Mix21.3500
6Grandma's Boysenberry Spreads25.001203000
7Uncle Bob's Organic Dried Pears30.0015450
8Northwoods Cranberry Sauce40.006240
9Mishi Kobe Nikus66.00271782
10Ikuras31.0031961
Click PostBack to see the state of the grid is preserved.

Example Source Code & Description

Instructions
Open in new window
  • The example demonstrates the usage of GridCalculatedColumn in Telerik RadGrid. You can sort, group and/or
    filter these columns exactly in the same way as you would GridBoundColumn. The columns that are going to be used in
    the calculation are specified by the DataFields property while the actual calculation is defined via the Expression property:

    <Columns>
     ..
     <telerik:GridCalculatedColumn HeaderText="Total Price" UniqueName="TotalPrice" DataType="System.Double"
     DataFields="UnitPrice, UnitsInStock" Expression="{0}*{1}" FooterText="Total : " Aggregate="Sum" />
     ..
     </Columns>

    Description of this column is available in this help article.

Compatible with ASP.NET 2.0, 3.5 AJAX enabled Accessibility Verified!Valid XHTML 1.1! Optimized for Visual Studio 2005, 2008
Copyright 2002-2010 © Telerik. All right reserved  | 
Telerik Inc., 460 Totten Pond Rd, Suite 640, Waltham, MA 02451

www.telerik.com  |  Terms of Use  |  Contact Us