Reader Level:
ARTICLE

DevExpress GridControl in Silverlight

Posted by Priya Linge Articles | Silverlight with C# November 03, 2011
This article demonstrates how to use the DevExpress GridControl in Silverlight.
  • 0
  • 0
  • 9774

Introduction :

The DevExpress GridControl works like a Datagrid in Silverlight but with some additional functionality.

Following DLL are important to add GridControl in silverlight.

  1. DevExpress.Data.v11.1
  2. DevExpress.Xpf.Controls.v11.1
  3. DevExpress.Xpf.Core.v11.1
  4. DevExpress.Xpf.Grid.v11.1.Core

Example :

Namespace :
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"

MainPage.Xaml:

        <dxg:GridControl HorizontalAlignment="Left" Grid.Row="0" ScrollViewer.HorizontalScrollBarVisibility="Visible"  ScrollViewer.VerticalScrollBarVisibility="Visible"
                             AutoPopulateColumns="True" Name="DataGridControl" VerticalAlignment="Top">
             <dxg:GridControl.View>
                 <dxg:TableView Name="tableView1" />
             </dxg:GridControl.View>
         </dxg:GridControl>

Explanation: As we have AutoGenerateColumns property in silverlight datagrid same way we have

AutoPopulatedColumns property in DevExpress GridControl.

DevExpress GridControl in silverlight

Here we have GroupPanel (Drag a column header here to group by that column).if this is not required for datagrid,we can set is as false like set ShowGroupPanel property of gridcontrol to false.

GroupPanel is use for grouping the columns, we can drag the particular column and set it as group by items as following way.

DevExpress GridControl

Here drag the column Name and make it group by name.

By right click on any column of grid we get some functionality like,

  1. Sort Ascending
  2. Sort Descending
  3. Group By This Column
  4. Hide Group Panel
  5. Show Column Chooser
GridControl in silverlight

As above screen we get Filter Editor for Grid. With the help of Filter Editor we can filter the grid data as we want as shown in following screen.

DevExpress Control

Here we put filter on column Name. Now can search the record related that name. We can search by many way like Name Equal or Equal not, Between, IsNull as shown in following screen.

DevExpress GridControl

Summary: We can use the DevExpress GridControl in silverlight,it provide many functionality with grid control as mentioned above.

COMMENT USING

Trending up