Math toolbar for column headers in RadGridView for Silverlight

Friday, January 22, 2010 by Pavel Pavlov | Comments 1

math_toolbar

 

A client has recently asked for these little fancy math toolbars in the column header. I found it a great idea and thought it might be useful to share the way of implementing this with RadGridView for Silverlight.

 

*Since RadGridView for WPF shares the same code base  the approach bellow may be used for both platforms ( Silverlight and WPF ) .

 

Things are easy with RadGridView !

 

To have this in your project follow these three easy steps :

 

1. Copy the MathToolBar user control from the attached sample project (MathToolBar.xaml, MathToolBar.cs).

2. Replace the default header in the column with the user control.

<telerik:GridViewDataColumn ...
   <telerik:GridViewDataColumn.Header>
     <local:MathToolBar HeaderText="Value1"/>
   </telerik:GridViewDataColumn.Header>
</telerik:GridViewDataColumn>

 

3. Adjust namespaces.

 

Note:

* If  you need different aggregate functions , you may choose from the standard aggregate functions offered by RadGridView,

or you may provide a custom one. Actually the Standard Deviation function in this example is a custom one. More info on how this is implemented may be found in this online example.

 

* if you need to customize the look of the toolbar ( e.g. add/remove buttons, change colors  ), the place to tamper is MathToolBar.xaml.

1 Comments

  • hythamraju 29 Feb 2012
    hi
    i am useing Red telarick Grid i want to dauble click the each row can i download the content of row accupay data

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)