Data Manipulation in Silverlight 4 Data Grid

Exclusive offer: get 50% off this eBook here
Microsoft Silverlight 4 Data and Services Cookbook

Microsoft Silverlight 4 Data and Services Cookbook — Save 50%

Over 80 practical recipes for creating rich, data-driven business applications in Silverlight with this Microsoft book and eBook

$35.99    $18.00
by Gill Cleeren Kevin Dockx | May 2010 | Microsoft

In this article by Gill Cleeren and Kevin Dockx, authors of Microsoft Silverlight 4 Data and Services Cookbook, we will learn about the following:

  • Displaying data in a customized DataGrid
  • Inserting, updating, and deleting data in a DataGrid
  • Sorting and grouping data in a DataGrid

Displaying data in a customized DataGrid

Displaying data is probably the most straightforward task we can ask the DataGrid to do for us. In this recipe, we'll create a collection of data and hand it over to the DataGrid for display. While the DataGrid may seem to have a rather fixed layout, there are many options available on this control that we can use to customize it.

In this recipe, we'll focus on getting the data to show up in the DataGrid and customize it to our likings.

Getting ready

In this recipe, we'll start from an empty Silverlight application. The finished solution for this recipe can be found in the Chapter04/Datagrid_Displaying_Data_Completed folder in the code bundle that is available on the Packt website.

How to do it...

We'll create a collection of Book objects and display this collection in a DataGrid. However,we want to customize the DataGrid. More specifically, we want to make the DataGridfixed. In other words, we don't want the user to make any changes to the bound data or move the columns around. Also, we want to change the visual representation of the DataGrid by changing the background color of the rows. We also want the vertical column separators to be hidden and the horizontal ones to get a different color. Finally, we'll hook into the LoadingRow event, which will give us access to the values that are bound to a row and based on that value, the LoadingRow event will allow us to make changes to the visual appearance of the row.

To create this DataGrid, you'll need to carry out the following steps:

  1. Start a new Silverlight solution called DatagridDisplayingData in Visual Studio.
    We'll start by creating the Book class. Add a new class to the Silverlight project in the solution and name this class as Book. Note that this class uses two enumerations—one for the Category and the other for the Language. These can be found in the sample code. The following is the code for the Book class:
    public class Book
    {
    public string Title { get; set; }
    public string Author { get; set; }
    public int PageCount { get; set; }
    public DateTime PurchaseDate { get; set; }
    public Category Category { get; set; }
    public string Publisher { get; set; }
    public Languages Language { get; set; }
    public string ImageName { get; set; }
    public bool AlreadyRead { get; set; }
    }
  2. In the code-behind of the generated MainPage.xaml file, we need to create a generic list of Book instances (List) and load data into this collection.This is shown in the following code:
    private List<Book> bookCollection;
    public MainPage()
    {
    InitializeComponent();
    LoadBooks();
    }
    private void LoadBooks()
    {
    bookCollection = new List<Book>();
    Book b1 = new Book();
    b1.Title = "Book AAA";
    b1.Author = "Author AAA";
    b1.Language = Languages.English;
    b1.PageCount = 350;
    b1.Publisher = "Publisher BBB";
    b1.PurchaseDate = new DateTime(2009, 3, 10);
    b1.ImageName = "AAA.png";
    b1.AlreadyRead = true;
    b1.Category = Category.Computing;
    bookCollection.Add(b1);
    ...
    }
  3. Next, we'll add a DataGrid to the MainPage.xaml file. For now, we won't add any extra properties on the DataGrid. It's advisable to add it to the page by dragging it from the toolbox, so that Visual Studio adds the correct references to the required assemblies in the project, as well as adds the namespace mapping in the XAML code. Remove the AutoGenerateColumns="False" for now so that we'll see all the properties of the Book class appear in the DataGrid. The following line of code shows a default DataGrid with its name set to BookDataGrid:
    <sdk:DataGrid x:Name="BookDataGrid"></sdk:DataGrid>
  4. Currently, no data is bound to the DataGrid. To make the DataGrid show the book collection, we set the ItemsSource property from the code-behind in the constructor. This is shown in the following code:
    public MainPage()
    {
    InitializeComponent();
    LoadBooks();
    BookDataGrid.ItemsSource = bookCollection;
    }
  5. Running the code now shows a default DataGrid that generates a column for each public property of the Book type. This happens because the AutoGenerateColumns property is True by default.
  6. Let's continue by making the DataGrid look the way we want it to look. By default, the DataGrid is user-editable, so we may want to change this feature. Setting the IsReadOnly property to True will make it impossible for a user to edit the data in the control. We can lock the display even further by setting both the CanUserResizeColumns and the CanUserReorderColumns properties to False. This will prohibit the user from resizing and reordering the columns inside the DataGrid, which are enabled by default. This is shown in the following code:
    <sdk:DataGrid x:Name="BookDataGrid"
    AutoGenerateColumns="True"
    CanUserReorderColumns="False"
    CanUserResizeColumns="False"
    IsReadOnly="True">
    </sdk:DataGrid>
  7. The DataGrid also offers quite an impressive list of properties that we can use to change its appearance. By adding the following code, we specify alternating the background colors (the RowBackground and AlternatingRowBackground properties), column widths (the ColumnWidth property), and row heights (the RowHeight property). We also specify how the gridlines should be displayed (the GridLinesVisibility and HorizontalGridLinesBrushs properties). Finally, we specify that we also want a row header to be added (the HeadersVisibility property ).
    <sdk:DataGrid x:Name="BookDataGrid"
    AutoGenerateColumns="True"
    CanUserReorderColumns="False"
    CanUserResizeColumns="False"
    RowBackground="#999999"
    AlternatingRowBackground="#CCCCCC"
    ColumnWidth="90"
    RowHeight="30"
    GridLinesVisibility="Horizontal"
    HeadersVisibility="All"
    HorizontalGridLinesBrush="Blue">
    </sdk:DataGrid>
  8. We can also get a hook into the loading of the rows. For this, the LoadingRow event has to be used. This event is triggered when each row gets loaded. Using this event, we can get access to a row and change its properties based on custom code. In the following code, we are specifying that if the book is a thriller, we want the row to have a red background:
    private void BookDataGrid_LoadingRow(object sender,
    DataGridRowEventArgs e)
    {
    Book loadedBook = e.Row.DataContext as Book;
    if (loadedBook.Category == Category.Thriller)
    {
    e.Row.Background = new SolidColorBrush(Colors.Red);
    //It's a thriller!
    e.Row.Height = 40;
    }
    else
    {
    e.Row.Background = null;
    }
    }

After completing these steps, we have the DataGrid that we wanted. It displays the data (including headers), fixes the columns and makes it impossible for the user to edit the data. Also, the color of the rows and alternating rows is changed, the vertical grid lines are hidden, and a different color is applied to the horizontal grid lines. Using the LoadingRow event, we have checked whether the book being added is of the "Thriller" category, and if so, a red color is applied as the background color for the row. The result can be seen in the following screenshot:

How it works...

The DataGrid allows us to display the data easily, while still offering us many customization options to format the control as needed.

The DataGrid is defined in the System.Windows.Controls namespace, which is located in the System.Windows.Controls.Data assembly. By default, this assembly is not referenced while creating a new Silverlight application. Therefore, the following extra references are added while dragging the control from the toolbox for the first time:

  • System.ComponentModel.DataAnnotations
  • System.Windows.Controls.Data
  • System.Windows.Controls.Data.Input
  • System.Windows.Data

While compiling the application, the corresponding assemblies are added to the XAP file (as can be seen in the following screenshot, which shows the contents of the XAP file). These assemblies need to be added because while installing the Silverlight plugin, they aren't installed as a part of the CLR. This is done in order to keep the plugin size small. However, when we use them in our application, they are embedded as part of the application. This results in an increase of the download size of the XAP file. In most circumstances, this is not a problem. However, if the file size is an important requirement, then it is essential to keep an eye on this.

Also, Visual Studio will include the following namespace mapping into the XAML file:

xmlns:sdk="clr-namespace:System.Windows.Controls;
assembly=System.Windows.Controls.Data"

From then on, we can use the control as shown in the following line of code:

<sdk:DataGrid x:Name="BookDataGrid"> </sdk:DataGrid>

Once the control is added on the page, we can use it in a data binding scenario. To do so, we can point the ItemsSource property to any IEnumerable implementation. Each row in the DataGrid will correspond to an object in the collection.

When AutoGenerateColumns is set to True (the default), the DataGrid uses a refl ection on the type of objects bound to it. For each public property it encounters, it generates a corresponding column. Out of the box, the DataGrid includes a text column, a checkbox column, and a template column. For all the types that can't be displayed, it uses the ToString method and a text column.

If we want the DataGrid to feature automatic synchronization, the collection should implement the INotifyCollectionChanged interface. If changes to the objects are to be refl ected in the DataGrid, then the objects in the collection should themselves implement the INotifyPropertyChanged interface.

There's more

While loading large amounts of data into the DataGrid, the performance will still be very good. This is the result of the DataGrid implementing UI virtualization, which is enabled by default.

Let's assume that the DataGrid is bound to a collection of 1,000,000 items (whether or not this is useful is another question). Loading all of these items into memory would be a time-consuming task as well as a big performance hit. Due to UI virtualization, the control loads only the rows it's currently displaying. (It will actually load a few more to improve the scrolling experience.) While scrolling, a small lag appears when the control is loading the new items. Since Silverlight 3, the ListBox also features UI virtualization.

Inserting, updating, and deleting data in a DataGrid

The DataGrid is an outstanding control to use while working with large amounts of data at the same time. Through its Excel-like interface, not only can we easily view the data, but also add new records or update and delete existing ones.

In this recipe, we'll take a look at how to build a DataGrid that supports all of the above actions on a collection of items.

Getting ready

This recipe builds on the code that was created in the previous recipe. To follow along with this recipe, you can keep using your code or use the starter solution located in the Chapter04/Datagrid_Editing_Data_Starter folder in the code bundle available on the Packt website. The finished solution for this recipe can be found in the Chapter04/Datagrid_Editing_Data_Completed folder.

Microsoft Silverlight 4 Data and Services Cookbook Over 80 practical recipes for creating rich, data-driven business applications in Silverlight with this Microsoft book and eBook
Published: April 2010
eBook Price: $35.99
Book Price: $59.99
See more
Select your format and quantity:

How to do it...

In this recipe, we'll work with the same Book class as in the previous recipe. Through the use of a DataGrid, we'll manage an ObservableCollection. We'll make it possible to add, update, and delete the items in the collection through the DataGrid. An ObservableCollection raises an event when items are added, removed, and so on, and Silverlight will listen for this event. The existing data will be edited by doing inline edits to the rows, which will be pushed back to the underlying collection. We'll allow the user to add or delete an item in the DataGrid by clicking on a button. Behind the scene, an item is added to or removed from the underlying collection. We'll also include a detail panel where the user can view more properties on the selected item in the DataGrid.

The following are the steps we need to perform:

  1. In the MainPage.xaml.cs file, we bind to a generic list of Book instances (List). For the DataGrid to react to the changes in the bound collection, the collection itself should implement the INotifyCollectionChanged interface. Thus, instead of a List, we'll use an ObservableCollection as shown in the following line of code:
    ObservableCollection<Book> bookCollection =
    new ObservableCollection<Book>();
  2. Let's first look at deleting the items. We may want to link the hitting of the Delete key on the keyboard with the removal of a row in the DataGrid. In fact, we're asking to remove the currently selected item from the bound collection. For this, we register for the KeyDown event on the DataGrid as shown in the following code:
    <sdk:DataGrid x:Name="BookDataGrid"
    KeyDown="BookDataGrid_KeyDown" ...>
  3. In the event handler, we'll need to check whether the key was the Delete key. Also, the required code for inserting the data—triggered by hitting the Insert key—is included. This is shown in the following code:
    private bool cellEditing = false;
    private void BookDataGrid_KeyDown(object sender, KeyEventArgs e)
    {
    if (e.Key == Key.Delete && !cellEditing)
    {
    RemoveBook();
    }
    else if (e.Key == Key.Insert && !cellEditing)
    {
    AddEmptyBook();
    }
    }
  4. Note the !cellEditing in the previous code. It's a Boolean field that we are using to check whether we are currently editing a value that is in a cell or we simply have a row selected. In order to carry out this check, we should add both the BeginningEdit and the CellEditEnded events in the DataGrid as shown in the following code. These will be triggered when the cell enters or leaves the edit mode respectively.
    <sdk:DataGrid x:Name="BookDataGrid"
    BeginningEdit="BookDataGrid_BeginningEdit"
    CellEditEnded="BookDataGrid_CellEditEnded" ...>
  5. In the event handlers, we change the value of the cellEditing variable as shown in the following code:
    private void BookDataGrid_BeginningEdit(object sender,
    DataGridBeginningEditEventArgs e)
    {
    cellEditing = true;
    }
    private void BookDataGrid_CellEditEnded(object sender,
    DataGridCellEditEndedEventArgs e)
    {
    cellEditing = false;
    }
  6. Next, we need to write the code either to add an empty Book object or to remove an existing one. Here, we're actually working with the ObservableCollection. We're adding items to the collection or removing them from it. The application UI contains two buttons. We can add two Click event handlers that will trigger adding or removing an item using the following code. Note that while deleting, we are checking whether an item is selected.
    private void AddButton_Click(object sender, RoutedEventArgs e)
    {
    AddEmptyBook();
    }
    private void DeleteButton_Click(object sender, RoutedEventArgs e)
    {
    RemoveBook();
    }
    private void AddEmptyBook()
    {
    Book b = new Book();
    bookCollection.Add(b);
    }
    private void RemoveBook()
    {
    if (BookDataGrid.SelectedItem != null)
    {
    Book deleteBook = BookDataGrid.SelectedItem as Book;
    bookCollection.Remove(deleteBook);
    }
    }
  7. Finally, let's take a look at updating the items. In fact, simply typing in new values for the existing items in the DataGrid will push the updates back to the bound collection. Add a Grid containing the TextBlock controls in order to see this. The entire Grid should be bound to selected row of the DataGrid. This is done by means of an element data binding. The following code is a part of this code. The remaining code can be found in the completed solution in the code bundle.
    <Grid DataContext="{Binding ElementName=BookDataGrid,
    Path=SelectedItem}" >
    <TextBlock Text="Title:"
    FontWeight="Bold"
    Grid.Row="1"
    Grid.Column="0">
    </TextBlock>
    <TextBlock Text="{Binding Title}"
    Grid.Row="1"
    Grid.Column="1">
    </TextBlock>
    </Grid>

We now have a fully working application to manage the data of the Book collection. We have a data-entry application that allows us to perform CRUD (create, read, update, and delete) operations on the data using the DataGrid. The final application is shown in the following screenshot:

 

How it works...

The DataGrid is bound to an ObservableCollection. This way, changes to the collection are reflected in the control immediately because of the automatic synchronization that data binding offers us on collections that implement the INotifyCollectionChanged interface. If the class (in our case, the Book class) itself implements the INotifyPropertyChanged interface, then the changes to the individual items are also refl ected. Implicitly, a DataGrid implements a TwoWay binding. We don't have to specify this anywhere.

To remove an item by hitting the Delete key, we first need to check that we're not editing the value of the cell. If we are, then the row shouldn't be deleted. This is done using the BeginningEdit and CellEditEnded events. The former one is called before the user can edit the value. It can also be used to perform some action on the value in the cell such as formatting. The latter event is called when the focus moves away from the cell.

In the end, managing (inserting, deleting, and so on) the data in the DataGrid comes down to managing the items in the collection. We leverage this here. We aren't adding any items to the DataGrid itself, but we are either adding items to the bound collection or removing items from the bound collection.

Sorting and grouping data in a DataGrid

Sorting the values within a column in a control such as a DataGrid is something that we take for granted. Silverlight's implementation has some very strong sorting options working out of the box for us. It allows us to sort by clicking on the header of a column, amongst other things.

Along with sorting, the DataGrid enables the grouping of values. Items possessing a particular property (that is, in the same column) and having equal values can be visually grouped within the DataGrid.

All of this is possible by using a view on top of the bound collection. In this recipe, we'll look at how we can leverage this view to customize the sorting and grouping of data within the DataGrid.

Getting ready

This sample continues with the same code that was created in the previous recipes of this article. If you want to follow along with this recipe, you can continue using your code or use the provided start solution located in the Chapter04/Datagrid_Sorting_And_Grouping_Starter folder in the code bundle that is available on the Packt website. The finished code for this recipe can be found in the Chapter04/Datagrid_Sorting_And_ Grouping_Completed folder.

How to do it...

We'll be using the familiar list of Book items again in this recipe. This list, which is implemented as an ObservableCollection, will not be directly bound to the DataGrid in this case. Instead, we'll use a PagedCollectionView that acts as a view on top of the collection. We'll change the way the DataGrid is sorted by default as well as introduce grouping within the control. The following are the steps to achieve all of this:

  1. Instead of using the AutoGenerateColumns feature, we'll define the columns that we want to see manually. We'll make use of several DataGridTextColumns, a DataGridCheckBoxColumn and a DataGridTemplateColumn. The following is the code for the DataGrid:
    <sdk:DataGrid x:Name="CopyBookDataGrid"
    AutoGenerateColumns="False" ... >
    <sdk:DataGrid.Columns>
    <sdk:DataGridTextColumn x:Name="CopyTitleColumn"
    Binding="{Binding Title}"
    Header="Title">
    </sdk:DataGridTextColumn>
    <sdk:DataGridTextColumn x:Name="CopyAuthorColumn"
    Binding="{Binding Author}"
    Header="Author">
    </sdk:DataGridTextColumn>
    <sdk:DataGridTextColumn x:Name="CopyPublisherColumn"
    Binding="{Binding Publisher}"
    Header="Publisher">
    </sdk:DataGridTextColumn>
    <sdk:DataGridTextColumn x:Name="CopyLanguageColumn"
    Binding="{Binding Language}"
    Header="Language">
    </data:DataGridTextColumn>
    <data:DataGridTextColumn x:Name="CopyCategoryColumn"
    Binding="{Binding Category}"
    Header="Category">
    </sdk:DataGridTextColumn>
    <sdk:DataGridCheckBoxColumn x:Name="CopyAlreadyReadColumn"
    Binding="{Binding AlreadyRead,
    Mode=TwoWay}"
    Header="Already read">
    </sdk:DataGridCheckBoxColumn>
    <sdk:DataGridTemplateColumn Header="Purchase date"
    x:Name="CopyPurchaseDateColumn">
    <sdk:DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <controls:DatePicker SelectedDate="{Binding
    PurchaseDate}">
    </controls:DatePicker>
    </DataTemplate>
    </sdk:DataGridTemplateColumn.CellTemplate>
    </sdk:DataGridTemplateColumn>
    </sdk:DataGrid.Columns>
    </sdk:DataGrid>
  2. In order to implement both sorting and grouping, we'll use the PagedCollectionView. It offers us a view on top of our data and allows the data to be sorted, grouped, filtered and so on without changing the underlying collection. The PagedCollectionView is instantiated using the following code. We pass in the collection (in this case, the bookCollection) on which we want to put the view.
    PagedCollectionView view = new
    PagedCollectionView(bookCollection);
  3. In order to change the manner of sorting from the code, we need to add a new SortDescription to the SortDescriptions collection of the view. In the following code, we are specifying that we want the sorting to occur on the Title property of the books in a descending order:
    view.SortDescriptions.Add(new SortDescription("Title",
    ListSortDirection.Descending));
  4. If we want our data to appear in groups, we can make it so by adding a new PropertyGroupDescription to the GroupDescriptions collection of the view. In this case, we want the grouping to be based on the value of the Language property. This is shown in the following code:
    view.GroupDescriptions.Add(new
    PropertyGroupDescription("Language"));
  5. The DataGrid will not bind to the collection, but to the view. We specify this by setting the ItemsSource property to the instance of the PagedCollectionView. The following code should be placed in the constructor as well:
    public MainPage()
    {
    InitializeComponent();
    LoadBooks();
    view = new PagedCollectionView(bookCollection);
    view.SortDescriptions.Add(new SortDescription("Title",
    ListSortDirection.Descending));
    view.GroupDescriptions.Add(new
    PropertyGroupDescription("Language"));
    BookDataGrid.ItemsSource = view;
    }

We have now created a DataGrid that allows the user to sort the values in a column as well as group the values based on a value in the column. The resulting DataGrid is shown in the following screenshot:

Microsoft Silverlight 4 Data and Services Cookbook Over 80 practical recipes for creating rich, data-driven business applications in Silverlight with this Microsoft book and eBook
Published: April 2010
eBook Price: $35.99
Book Price: $59.99
See more
Select your format and quantity:

How it works...

The actions such as sorting, grouping, filtering and so on don't work on an actual collection of data. They are applied on a view that sits on top of the collection (either a List or an ObservableCollection). This way, the original data is not changed. Due to this, we can show the same collection more than once in a different format on the same screen. Different views are applied on the same source data (for example, sorted in one DataGrid by Title and in another one by Author). This view is implemented through the PagedCollectionView class.

To change the sorting, we can add a new SortDescription to the SortDescriptions collection that the view encapsulates. Note that SortDescriptions is a collection in which we can add more than one sort field. The second SortDescription value will be used only when equal values are encountered for the first SortDescription value.

Grouping (using the PropertyGroupDescription) allows us to split the grid into different levels. Each section will contain items that have the same value for a particular property. Similar to sorting, we can add more than one PropertyGroupDescription, which results in nested groups.

There's more...

From code, we can control all groups to expand or collapse. The following code shows us how to do so:

private void CollapseGroupsButton_Click(object sender,
RoutedEventArgs e)
{
foreach (CollectionViewGroup group in view.Groups)
{
BookDataGrid.CollapseRowGroup(group, true);
}
}
private void ExpandGroupsButton_Click(object sender,
RoutedEventArgs e)
{
foreach (CollectionViewGroup group in view.Groups)
{
BookDataGrid.ExpandRowGroup(group, true);
}
}

Sorting a template column

If we want to sort a template column, we have to specify which value needs to be taken into account for the sorting to be executed. Otherwise, Silverlight has no clue which field it should take.

This is done by setting the SortMemberPath property as shown in the following code:

<sdk:DataGridTemplateColumn x:Name="PurchaseDateColumn"
SortMemberPath="PurchaseDate">

We'll look at the DataGridTemplateColumn in more detail in the Using custom columns in the DataGrid recipe of this article.

Summary

In this article, we discussed about the following:

  • Displaying data in a customized DataGrid
  • Inserting, updating, and deleting data in a DataGrid
  • Sorting and grouping data in a DataGrid

If you have read this article you may be interested to view :

About the Author :


Gill Cleeren

Gill Cleeren is Microsoft Regional Director (http://www.theregion.com), Silverlight MVP (former ASP.NET MVP) and Telerik MVP. He lives in Belgium where he works as .NET architect at Ordina (http://www.ordina.be/). Passionate about .NET, he’s always playing with the newest bits. In his role as Regional Director, Gill has given many sessions, webcasts and training on new as well as existing technologies, such as Silverlight, ASP.NET and WPF at conferences including TechEd Berlin 2010, TechDays Belgium – Switzerland - Sweden, DevDays NL, NDC Oslo Norway, DevReach Bulgaria, NRW Conference Germany, Spring Conference UK, Telerik Silverlight Roadshow in Sweden, Telerik RoadShow UK. He is the author of Packt’s Microsoft Silverlight 4 Data and Services Cookbook and is also the author of many articles in various developer magazines and for SilverlightShow.net and he organizes the yearly Community Day event in Belgium. He also leads Visug (http://www.visug.be), the largest .NET user group in Belgium. You can find his blog at http://www.snowball.be and on Twitter by following @gillcleeren.

Kevin Dockx

Kevin Dockx lives in Belgium and works at RealDolmen, one of Belgium's biggest ICT companies, where he is a 30-year old technical specialist/project leader on .NET web applications, mainly Silverlight, and a solution manager for Rich Applications (Silverlight, Windows Phone 7, WPF, Surface, HTML5). His main focus is on all things Silverlight, but he still keeps an eye on the new developments concerning other products from the Microsoft .NET (Web) Stack. As a Silverlight enthusiast, he's a regular speaker on various national and international events, like Microsoft DevDays in the Netherlands, Microsoft Techdays in Portugal, NDC Oslo Norway, and Community Day Belgium. He is the author of Packt’s Microsoft Silverlight 4 Data and Services Cookbook and also writes articles for various Silverlight-related sites & magazines. His blog, which contains various tidbits on Silverlight, .NET, and the occasional rambling, can be found at http://blog.kevindockx.com/, and you can find him on Twitter as well: @KevinDockx.

Books From Packt

Microsoft Silverlight 4 Business Application Development: Beginner’s Guide
Microsoft Silverlight 4 Business Application Development: Beginner’s Guide

SOA Patterns with BizTalk Server 2009
SOA Patterns with BizTalk Server 2009

ASP.NET MVC 1.0 Quickly
ASP.NET MVC 1.0 Quickly

Programming Microsoft Dynamics NAV 2009
Programming Microsoft Dynamics NAV 2009

VSTO 3.0 for Office 2007 Programming
VSTO 3.0 for Office 2007 Programming

Microsoft Dynamics AX 2009 Programming: Getting Started
Microsoft Dynamics AX 2009 Programming: Getting Started

Least Privilege Security for Windows 7, Vista, and XP
Least Privilege Security for Windows 7, Vista, and XP

Learning SQL Server 2008 Reporting Services
Learning SQL Server 2008 Reporting Services

 

Your rating: None Average: 3.8 (4 votes)
Code for the solution by
You can download the code from the following link: https://www.packtpub.com/support?nid=4465
Solution Not Available by
The code for this solution is not available at the link given http://downloads.packtpub.com/sites/default/files/9768_Code.zip 404 The page you are looking for does not exist
Excellent Coverage by
Got a lot of what I needed to get started right here!
Good book by
Thanks for the article. However, Your article only shows how to update one row at a time. I wish you could cover one scenario that if a user want to update all rows at once by clicking on the "Save" button. This scenario seems to be more realistic to the Business application world. Bests le9569
Data formula or caculation in grid cell by
Thanks for the article. I bought your book and it is really gexcellent resource for learning silverlight/data binding. I have a question on the data grid. What is the best way to make an unbound field do calcuations. Somewhat similar to the formulas found in Excel for example? Is that something doable (using an Excel dll...). I looked into most of the 3rd part control vendors and could not find such functionality with their data grids. Thanks Kal

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
a
7
U
q
Y
u
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software