This is a migrated thread and some comments may be shown as answers.

[Solved] RadGridView Empty Content Display

0 Answers 242 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rakesh
Top achievements
Rank 1
Rakesh asked on 20 Mar 2013, 09:43 PM
I want to display "NO DATA FOUND" when there are no items in radgrid.

As a part of customization of RadGridView Styles:

I placed TextBlock in appropriate location (GridView ControlTemplate i.e HierrarchyBackground) to display in a grid.

    <TextBlock Name="NoContentTB" Text="No Data Available" FontSize="16" VerticalAlignment="Center" Foreground="Red" HorizontalAlignment="Center" Grid.ColumnSpan="2" Grid.RowSpan="4" Visibility="{Binding HasItems, Converter={StaticResource BooleanToCollapsedConverter}, RelativeSource={RelativeSource TemplatedParent}}"/>

It's working but there is a issue with HasItems.

HasItems property is raised before items are binded. So we are have odd behaviour.

Any help is really appreciated.
Tags
GridView
Asked by
Rakesh
Top achievements
Rank 1
Share this question
or