Adding a Custom Row to the Data Grid

You can replace rows the data grid uses to show the data of each data item or group with custom rows, or you can add custom rows on top or bottom of data item rows.

Replacing Data Item Row

In order to replace the rows generated by the data grid you must add a handler to the CreatingRow event. For example, in the following image the rows were replaced with template rows:

 

The following code replaces the default row with a template row:

      Visual Basic

      C#

Adding an Extra Row

ComponentOne DataGrid for Silverlight allows adding one or more rows on top or bottom of data. This functionality is used in the new row, total row, summary row, and filter row scenarios.

For example, in XAML or code:

      XAML

      Visual Basic

      C#


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.