We are happy to announce the availability of VIBlend Silverlight Controls 6.0. The newest version of VIBlend Silverlight Controls includes a set of new Metro UI Themes - Metro Blue, Metro Green and Metro Orange themes.
To download an evaluation version, please visit our Download page.
View the updated Online Demo.
Currently rated 5.0 by 2 people
Tags: silverlight, silverlight 4, silverlight 5, viblend, viblend silverlight controls, datagrid, treeview, scheduler, ribbon bar, gridview, grid, silverlight controls, .net controls, viblend controls, navigation bars, silverlight grid, pivot grid
Buttons | calendar control | ComboBox | DataGrid | GridView | Navigation Pane | olap | pivot | pivot grid | pivot, olap | Silverlight | Silverlight Controls | TabControl | VIBlend Silverlight Controls
This example demonstrates how to bind the VIBlend DataGrid for Silverlight to a list of invoices that has nested properties. The schema of data source contains the following DataFields / Properties: SalesPerson(string), ShipperCompany(string), ProductName(string), UnitPrice(double), Quantity(double), Discount(double), ExtendedPrice(double), Freight(double) and Address(Address). The address object has the following properties: City(string), Region(string) and Country(string). We'll create a Pivot Table with 3 pivot rows - City, Country and Region and 1 pivot column - Shipper Company. <viblend:DataGrid ItemsSource="{Binding}" x:Name="dataGrid1" Margin="4" Background="White" AutoGenerateColumns="True"> <viblend:DataGrid.BoundFields> <viblend:BoundField Text="Country" DataField="Address.Country" Width="160" SortMode="NotSortable"/> <viblend:BoundField Text="City" DataField="Address.City" Width="140" SortMode="NotSortable"/> <viblend:BoundField Text="Region" DataField="Address.Region" Width="140" SortMode="NotSortable"/> <viblend:BoundField Text="Carrier" DataField="ShipperCompany" Width="140" SortMode="NotSortable" /> <viblend:BoundField Text="ExtendedPrice" DataField="ExtendedPrice" Width="140" SortMode="NotSortable" /> </viblend:DataGrid.BoundFields> <viblend:DataGrid.BoundPivotRows> <viblend:BoundField Text="Country" DataField="Address.Country" Width="160" SortMode="NotSortable"/> <viblend:BoundField Text="Region" DataField="Address.Region" Width="160" SortMode="NotSortable"/> <viblend:BoundField Text="City" DataField="Address.City" Width="140" SortMode="NotSortable"/> </viblend:DataGrid.BoundPivotRows> <viblend:DataGrid.BoundPivotColumns> <viblend:BoundField Text="Carrier" DataField="ShipperCompany" Width="140" SortMode="NotSortable"/> </viblend:DataGrid.BoundPivotColumns> <viblend:DataGrid.BoundPivotValues> <viblend:BoundValueField Width="120" CellHorizontalContentAlignment="Center" Text="Count of Sales" Function="Count" DataField="ExtendedPrice"></viblend:BoundValueField> <viblend:BoundValueField Width="120" CellHorizontalContentAlignment="Right" CellVerticalContentAlignment="Center" CellTextFormatString="{}{0:C}" Text="Amount of Sales" Function="Sum" DataField="ExtendedPrice"></viblend:BoundValueField> <viblend:BoundValueField Width="120" CellHorizontalContentAlignment="Right" CellVerticalContentAlignment="Center" CellTextFormatString="{}{0:C}" Text="Avg Sale Amount" Function="Average" DataField="ExtendedPrice"></viblend:BoundValueField> </viblend:DataGrid.BoundPivotValues> </viblend:DataGrid> The following code generates the sample data in the example: C# public PivotTableDemo() { InitializeComponent(); PrepareGridData(); this.DataContext = this.lst; } public class Invoice { public Invoice( string City, string Region, string Country, string SalesPerson, string ShipperCompany, string ProductName, double UnitPrice, double Quantity, double Discount, double ExtendedPrice, double Freight) { this.SalesPerson = SalesPerson; this.Address = new Address(); this.Address.City = City; this.Address.Region = string.IsNullOrEmpty(Region) ? "All Regions" : Region; this.Address.Country = Country; this.ShipperCompany = ShipperCompany; this.ProductName = ProductName; this.UnitPrice = UnitPrice; this.Quantity = Quantity; this.Discount = Discount; this.ExtendedPrice = ExtendedPrice; this.Freight = Freight; } public string SalesPerson { get; set; } public string ShipperCompany { get; set; } public Address Address { get; set; } public string ProductName { get; set; } public double UnitPrice { get; set; } public double Quantity { get; set; } public double Discount { get; set; } public double ExtendedPrice { get; set; } public double Freight { get; set; } } public class Address { public string City { get; set; } public string Region { get; set; } public string Country { get; set; } } public List<Invoice> lst = new List<Invoice>(); private void PrepareGridData() { try { StreamResourceInfo sri = Application.GetResourceStream(new Uri("IntegratedDemo;component/Examples/Grid/invoices.tab", UriKind.Relative)); System.IO.StreamReader sr = new System.IO.StreamReader(sri.Stream); string line = null; sr.ReadLine(); while ((line = sr.ReadLine()) != null) { string[] tabs = line.Split('\t'); lst.Add(new Invoice(tabs[0], tabs[1], tabs[2], tabs[3], tabs[4], tabs[5], double.Parse(tabs[6]), double.Parse(tabs[7]), double.Parse(tabs[8]), double.Parse(tabs[9]), double.Parse(tabs[10]))); } sr.Close(); } catch (System.Exception) { } } VB .NET Public Sub New() InitializeComponent() PrepareGridData() Me.DataContext = Me.lst End Sub Public Class Invoice Public Sub New(ByVal City As String, ByVal Region As String, ByVal Country As String, ByVal SalesPerson As String, ByVal ShipperCompany As String, ByVal ProductName As String, ByVal UnitPrice As Double, ByVal Quantity As Double, ByVal Discount As Double, ByVal ExtendedPrice As Double, ByVal Freight As Double) Me.SalesPerson = SalesPerson Me.Address = New Address() Me.Address.City = City Me.Address.Region = If(String.IsNullOrEmpty(Region), "All Regions", Region) Me.Address.Country = Country Me.ShipperCompany = ShipperCompany Me.ProductName = ProductName Me.UnitPrice = UnitPrice Me.Quantity = Quantity Me.Discount = Discount Me.ExtendedPrice = ExtendedPrice Me.Freight = Freight End Sub Private privateSalesPerson As String Public Property SalesPerson() As String Get Return privateSalesPerson End Get Set(ByVal value As String) privateSalesPerson = value End Set End Property Private privateShipperCompany As String Public Property ShipperCompany() As String Get Return privateShipperCompany End Get Set(ByVal value As String) privateShipperCompany = value End Set End Property Private privateAddress As Address Public Property Address() As Address Get Return privateAddress End Get Set(ByVal value As Address) privateAddress = value End Set End Property Private privateProductName As String Public Property ProductName() As String Get Return privateProductName End Get Set(ByVal value As String) privateProductName = value End Set End Property Private privateUnitPrice As Double Public Property UnitPrice() As Double Get Return privateUnitPrice End Get Set(ByVal value As Double) privateUnitPrice = value End Set End Property Private privateQuantity As Double Public Property Quantity() As Double Get Return privateQuantity End Get Set(ByVal value As Double) privateQuantity = value End Set End Property Private privateDiscount As Double Public Property Discount() As Double Get Return privateDiscount End Get Set(ByVal value As Double) privateDiscount = value End Set End Property Private privateExtendedPrice As Double Public Property ExtendedPrice() As Double Get Return privateExtendedPrice End Get Set(ByVal value As Double) privateExtendedPrice = value End Set End Property Private privateFreight As Double Public Property Freight() As Double Get Return privateFreight End Get Set(ByVal value As Double) privateFreight = value End Set End Property End Class Public Class Address Private privateCity As String Public Property City() As String Get Return privateCity End Get Set(ByVal value As String) privateCity = value End Set End Property Private privateRegion As String Public Property Region() As String Get Return privateRegion End Get Set(ByVal value As String) privateRegion = value End Set End Property Private privateCountry As String Public Property Country() As String Get Return privateCountry End Get Set(ByVal value As String) privateCountry = value End Set End Property End Class Public lst As List(Of Invoice) = New List(Of Invoice)() Private Sub PrepareGridData() Try Dim sri As StreamResourceInfo = Application.GetResourceStream(New Uri("IntegratedDemo;component/Examples/Grid/invoices.tab", UriKind.Relative)) Dim sr As New System.IO.StreamReader(sri.Stream) Dim line As String = Nothing sr.ReadLine() line = sr.ReadLine() Do While line IsNot Nothing Dim tabs() As String = line.Split(ControlChars.Tab) lst.Add(New Invoice(tabs(0), tabs(1), tabs(2), tabs(3), tabs(4), tabs(5), Double.Parse(tabs(6)), Double.Parse(tabs(7)), Double.Parse(tabs(8)), Double.Parse(tabs(9)), Double.Parse(tabs(10)))) line = sr.ReadLine() Loop sr.Close() Catch e1 As System.Exception End Try End Sub
Note: The 'invoices.tab' file is included in the installation package of VIBlend Controls for Silverlight. The default path to the file is: C:\Program Files\VIBlend\SilverlightControls v.5.0\Source Code\CSharp\Examples\Grid\invoices.tab.
Be the first to rate this post
Tags: datagrid, silverlight, viblend datagrid, gridview
DataGrid | olap | olap grid | pivot grid | pivot, olap | Silverlight | Silverlight Controls | VIBlend Silverlight Controls
The new version of VIBlend Controls for WinForms is coming in a few weeks and will deliver an upgrade to the DataGridView control with new features, better UI and styling capabilities.
- Extended filtering options
The DataGridView filtering window will be extended by providing an easier and user-friendly experience. The new filtering window will show a checked list, allowing for single and/or multiple selections. The previous filtering mechanism will still be available and you will be able to switch to it by clicking a single button. The filtering improvements will also include new case-sensitive filtering options.
- Improved support for Totals
The Pivot-Table totals support will be extended by adding a capability that will allow you to display Sub-Totals, Grand-Totals or a combination of Sub-Totals and Grand-Totals
- New Cell Editors
The new version will include several new cell editors – Currency, Percentage, Number, Mask and Fixed-Point Editors
- New Pivot-Table Filtering and enhanced Pivot-Design panel
The DataGridView will expose a new BoundFieldsFilters collection that will allow you to filter data in the Pivot-Table and display only a subset of data that meet the filtering criteria (criteria: Conditions you specify to limit which records are included in the result set of a filter.) that you specify and hides data that you do not want displayed. The Pivot-Design panel will feature a new Filter Area box that will enable you to manipulate the BoundFieldsFilters collection by drag and drop. Another addition to the Pivot-Design panel will be the Localization support.
Tags: datagridview, winforms, gridview, viblend datagrid, viblend winforms controls, windows forms datagrid
DataGrid | GridView | olap | olap grid | pivot | pivot grid | pivot, olap | VIBlend Controls for WinForms | WinForms | winforms grid
One of the most common data binding scenarios is to bind a DataGrid to a SQL Server Database and to load records from a specified data table. In this post, we will explain you how to set up basic data binding in VIBlend WPF DataGrid to the Customer table of the AdventureWorksLT Database.
So the first step would be to create a new WPF Application Project and then create a new instance of the DataGrid via drag and drop from the toolbox or create it programmatically. The DataGrid fields that will represent data source fields are created in XAML markup. Below you will see that we have very simple XAML for our WPF application which adds a DataGrid to the window
<viblendDataGrid:DataGrid ItemsSource="{Binding Customer}" Name="dataGrid1" Margin="10"> <viblendDataGrid:DataGrid.BoundFields> <viblendDataGrid:BoundField Text="First Name" DataField="FirstName" Width="70"/> <viblendDataGrid:BoundField Text="Last Name" DataField="LastName" Width="70"/> <viblendDataGrid:BoundField Text="Company Name" DataField="CompanyName" Width="150"/> <viblendDataGrid:BoundField Text="Phone" DataField="Phone" Width="100"/> <viblendDataGrid:BoundField Text="Email Address" DataField="EmailAddress" Width="100"/> </viblendDataGrid:DataGrid.BoundFields> </viblendDataGrid:DataGrid>
Next, create a new AdventureWorksLTDataSet. In order to create it, do the following: Select Data->Add New DataSource->DataBase->DataSet. Add a connection to the AdventureWorksLT Database and Click the 'Next' button. Then expand the 'Tables' tree node, select Customer and click the 'Finish' button.
Note: The AdventureWorksLT Database is installed with the installation of the SQL Server. However, you can also download and install it from http://sqlserversamples.codeplex.com Once the Data Source is configured, create new instances of the AdventureWorksLTDataSet data set. and CustomerTableAdapter , then fill the Customer table with data. Finally, bind the VIBlend DataGrid for WPF to the Customer table. C# public partial class MainWindow : Window { AdventureWorksLTDataSet dataSet = new AdventureWorksLTDataSet(); AdventureWorksLTDataSetTableAdapters.CustomerTableAdapter adapter = new AdventureWorksLTDataSetTableAdapters.CustomerTableAdapter(); public MainWindow() { InitializeComponent(); adapter.Fill(dataSet.Customer); this.dataGrid1.DataContext = this; } public WpfApplication2.AdventureWorksLTDataSet.CustomerDataTable Customer { get { return this.dataSet.Customer; } } } VB .NET
Partial Public Class MainWindow Inherits Window Private dataSet As New AdventureWorksLTDataSet() Private adapter As New AdventureWorksLTDataSetTableAdapters.CustomerTableAdapter() Public Sub New() InitializeComponent() adapter.Fill(dataSet.Customer) Me.dataGrid1.DataContext = Me End Sub Public ReadOnly Property Customer() As WpfApplication2.AdventureWorksLTDataSet.CustomerDataTable Get Return Me.dataSet.Customer End Get End Property End Class
Currently rated 5.0 by 1 people
Tags: wpf datagrid, wpf datagridview, gridview, datagridview, data binding, data, binding, grid control
DataGrid | GridView | olap | olap grid | pivot | pivot grid | pivot, olap | WPF DataGrid
In this post we will demonstrate you how to bind the VIBlend WPF DataGrid to "Invoices" view in the Nwind.mdb database, which is shipped with the installation. The control will be used to analyze sales per country and shippers companies.
At first you need to create a new instance of the NwindDataSet and InvoicesTableAdapter. Then you need to fill the table with data and set the DataContext property.
C#
NwindDataSet dataSet = new NwindDataSet(); InvoicesTableAdapter adapter = new InvoicesTableAdapter(); adapter.Fill(dataSet.Invoices); this.DataContext = dataSet.Invoices;
VB .NET
Dim dataSet As New NwindDataSet() Dim adapter As New InvoicesTableAdapter() adapter.Fill(dataSet.Invoices) Me.DataContext = dataSet.Invoices
The DataGrid fields that will represent data source fields are created in XAML markup. In order to format the currency data, you should specify the StringFormat property in the binding expression.
<Window x:Class="DataBinding.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:DataBinding" Title="MainWindow" Height="350" Width="525" xmlns:viblendDataGrid="clr-namespace:VIBlend.WPF.Controls;assembly=VIBlend.WPF.DataGrid"> <Grid> <Grid.Resources> <DataTemplate x:Key="CellTemplate"> <TextBlock HorizontalAlignment="Right" Text="{Binding StringFormat=C2}"/> </DataTemplate> </Grid.Resources> <viblendDataGrid:DataGrid ItemsSource="{Binding}" Name="dataGrid1" Margin="10"> <viblendDataGrid:DataGrid.BoundFields> <viblendDataGrid:BoundField Text="Shippers Company" DataField="Shippers_CompanyName"/> <viblendDataGrid:BoundField Text="Country" DataField="Country"/> <viblendDataGrid:BoundField Text="ExtendedPrice" DataField="ExtendedPrice"/> </viblendDataGrid:DataGrid.BoundFields> <viblendDataGrid:DataGrid.BoundPivotRows> <viblendDataGrid:BoundField Width="100" Text="Country" DataField="Country"/> </viblendDataGrid:DataGrid.BoundPivotRows> <viblendDataGrid:DataGrid.BoundPivotColumns> <viblendDataGrid:BoundField Text="Shippers Company" DataField="Shippers_CompanyName"/> </viblendDataGrid:DataGrid.BoundPivotColumns> <viblendDataGrid:DataGrid.BoundPivotValues> <viblendDataGrid:BoundValueField CellDataTemplate="{StaticResource CellTemplate}" Text="Sum" DataField="ExtendedPrice" Function="Sum"/> <viblendDataGrid:BoundValueField CellDataTemplate="{StaticResource CellTemplate}" Text="Average Price" DataField="ExtendedPrice" Function="Average"/> </viblendDataGrid:DataGrid.BoundPivotValues> </viblendDataGrid:DataGrid> </Grid> </Window>
Here is an image of the result:
Tags: pivot grid, data binding, wpf pivot grid, wpf gridview, viblend wpf grid, wpf controls
DataGrid | olap | olap grid | pivot grid | pivot, olap | WPF DataGrid
The latest version of VIBlend Controls for Silverlight features significant improvements to the DataGrid’s scrolling capabilities. DataGrid now offers fast animated smooth scrolling with inertia for impressive UI performance. In this blog post, we will introduce you how to use the properties that you need to know, in order to set up the DataGrid’s scrolling behavior. The ScrollAnimationMode property allows you to enable or disable the animated scrolling. The DataGrid’s default animation mode is scrolling with intertia, In order to disable the scrolling, you need to set the ScrollAnimationMode property to ScrollAnimationMode.No_Animation.
dataGrid.ScrollAnimationMode = DataGrid.ScrollAnimationModes.NO_ANIMATION;
dataGrid.ScrollAnimationMode = DataGrid.ScrollAnimationModes.NO_ANIMATION
Use the following code snippet to enable the smooth scrolling mode:
dataGrid.ScrollAnimationMode = DataGrid.ScrollAnimationModes.SMOOTH_SCROLL;
dataGrid.ScrollAnimationMode = DataGrid.ScrollAnimationModes.SMOOTH_SCROLL
VIBlend DataGrid control also supports a beautiful opacity animation while you scroll its content. You can enable this animation by using the ScrollOpacityAnimationEnabled property. The code snippet below enables the scrolling opacity animation:
dataGrid.ScrollOpacityAnimationEnabled = true;
dataGrid.ScrollOpacityAnimationEnabled = True The ScrollAnimationTime property allows you to change the duration of the scrolling animation. Here is demonstrated how to the set the duration to 1 second:
dataGrid.ScrollAnimationTime = new TimeSpan(0, 0, 1); VB .NET
dataGrid.ScrollAnimationTime = New TimeSpan(0, 0, 1)
By default, when the user drags the thumb on a scrollbar, the content view continuously updates. In deferred scrolling, the content is updated only when the user releases the thumb. You can enable the deferred scrolling mode by using the DeferredScrollingEnabled property. For example:
C# dataGrid.DeferredScrollingEnabled = true;
dataGrid.DeferredScrollingEnabled = True
Tags: silverlight datagrid, silverlight grid, silverlight olap, olap grid, pivot grid, gridview
DataGrid | olap | olap grid | pivot grid | pivot, olap | VIBlend Silverlight Controls
Tags: windows forms, winforms, olap, olap grid, pivot, pivot design
DataGrid | olap | olap grid | pivot grid | pivot, olap | VIBlend Controls for WinForms
One of the key features that you can expect in the new release is the Pivot Design Panel. The Pivot Design panel integrates with VIBlend DataGrid for Windows Forms. It provides an intuitive and easy to use drag and drop interface for defining pivot table views. You can choose the pivot rows, pivot colums, data fields and data aggregation functions. This solution is ideal for building a wide range of in-house OLAP and BI applications.
Another improvement will be the DataGrid’s Localization Provider that enables you to localize the ContextMenu and FilteringWindow strings.
For more information regarding the new release, feel free to contact us at support@viblend.com
Tags: olap for winforms, viblend olap grid, pivot grid, winforms olap
DataGrid | GridView | olap | olap grid | pivot | pivot grid | pivot, olap
New in version 1.4 of VIBlend Silverlight Controls is the ability to create a Pivot Table entirely in XAML.
As usual you have to specify which columns (data fields) from the data source will represent the pivot table's rows, columns and values fields.
Below is the full XAML required to declare a pivot table:
<UserControl x:Class="SilverlightApplication1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="800" xmlns:viblend="clr-namespace:VIBlend.Silverlight.Controls;assembly=DataGrid"> <Grid x:Name="LayoutRoot" Background="White"> <viblend:DataGrid AutoGenerateColumns="True" PivotValuesOnRows="False" Name="dataGrid1" Height="200" Width="500"> <viblend:DataGrid.BoundPivotRows> <viblend:BoundField DataField="Country" Text="Country"/> <viblend:BoundField DataField="Region" Text="Region"/> <viblend:BoundField DataField="City" Text="City"/> </viblend:DataGrid.BoundPivotRows> <viblend:DataGrid.BoundPivotColumns> <viblend:BoundField DataField="ShipperCompany" Text="Shipper Company"/> </viblend:DataGrid.BoundPivotColumns> <viblend:DataGrid.BoundPivotValues> <viblend:BoundValueField DataField="ExtendedPrice" Text="Count of Sales" Function="Count"/> <viblend:BoundValueField DataField="ExtendedPrice" Text="Amount of Sales" Function="Sum"/> <viblend:BoundValueField DataField="ExtendedPrice" Text="Avg Sale Amount" Function="Average"/> </viblend:DataGrid.BoundPivotValues> </viblend:DataGrid> </Grid> </UserControl>
After that simply bind to the data source by setting the ItemsSource property of the data grid control:
dataGrid1.ItemsSource = myData;
The result is a great looking pivot table with interactive drill down support.
VIBlend DataGrid for Silverlight uses a built-in OLAP engine to construct the pivot table. You can bind the DataGrid to any data source and easily build in-house Business Intelligence and reporting tools within minutes.
Currently rated 5.0 by 3 people
Tags: silverlight, pivot table, xaml
olap | olap grid | pivot grid | Silverlight
We are proud to announce the release of the latest version of VIBlend Silverlight Controls.
The new edition includes many improvements in VIBlend’s OLAP Grid for Silverlight:
The release of version 1.3 brings a new Silverlight TreeView control loaded with advanced features, stylish animations and offering easy to use and flexible programming model.
Tags:
olap | pivot | Silverlight | pivot grid | olap grid
VIBlend Blog is powered by BlogEngine.NET