Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Custom Rows for Silverlight DataGrid
2 replies. Latest Post by raz0rf1sh on June 30, 2009.
(0)
Maddes
Member
1 points
6 Posts
02-19-2009 5:01 AM |
I would like to add a custom header (individual filters for every column) and a footer row to the Silverlight DataGrid. The columns of these custom-rows should react to the standard resize-function of the columns and scroll within the table. My actual solution is to put these custom things into the table control template, but this way it's not possible to make them scroll or react to column resizing. When I put something into the header-template it's impossible to have individual filters and it seems i cannot edit the RowPresenter template. Thanks in advance for answers.
shamrat231
Contributor
4677 points
595 Posts
02-25-2009 11:45 PM |
Maddes:I would like to add a custom header (individual filters for every column) and a footer row to the Silverlight DataGrid
[custom header] well i am showing a simple example on how to customize the header for a single column
<UserControl xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
xmlns:c="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" x:Class="SilverlightApplication1.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:SilverlightApplication1" xmlns:prim="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data" > <Grid x:Name="LayoutRoot" Background="Azure"> <data:DataGrid x:Name="dgApartmentsStatus" GridLinesVisibility="All" > <data:DataGrid.Columns> <data:DataGridTextColumn Binding="{Binding Path=Apartment}" > <data:DataGridTextColumn.HeaderStyle> <Style TargetType="prim:DataGridColumnHeader"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <TextBlock Text="My Apartment" TextAlignment="Center" Width="200" /> </DataTemplate> </Setter.Value> </Setter> </Style> </data:DataGridTextColumn.HeaderStyle> </data:DataGridTextColumn> </data:DataGrid.Columns> </data:DataGrid> </Grid></UserControl>
see if this helps
[custom footer] http://silverlight.net/forums/t/56897.aspx
Sharker Khaleed MahmudSoftware Developer(MCP,MCTS,MCPD[web])
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
raz0rf1sh
6 points
06-30-2009 9:41 AM |
Any luck implementing a footer?