Sunday, 15 May 2011

silverlight: datagrid column header with image and implement a filter - custom column header

We can achieve this by using the celltemplate which is present in datagridtemplatecolumn. The below code explains you everything



<data:DataGridTemplateColumn Header="Clip Type">
                                <data:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Image Width="15" Margin="3" Height="15" Source="{Binding IsLocalClip, Converter={StaticResource DataConverter},ConverterParameter='IsLocalClip'}"></Image>
                                    </DataTemplate>
                                </data:DataGridTemplateColumn.CellTemplate>
                            </data:DataGridTemplateColumn>


Hope this helps!

2 comments:

  1. This is a nice article..
    Its very easy to understand ..
    And this article is using to learn something about it..
    asp.net, c#, javascript
    Thanks a lot..!

    ReplyDelete