Home Forums WPF controls Xceed DataGrid for WPF No Data Label

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24007 |

    Is there a way in XAML with Xceed to have some sort of Template or Style to put a label in the middle of the grid saying something like ‘Search did not find any results’ if the datasource I bind to it is blank?

    Thanks!

    Imported from legacy forums. Posted by Mark (had 391 views)

    User (Old forums)
    Member
    Post count: 23064

    Well, you could do something like this :

    <Grid>
    <xcdg:DataGrid … />
    <TextBlock VerticalAlignment=”Center” HorizontalAlignment=”Center” Text=”LABEL TEXT HERE”…./>
    </Grid>

    Make sure that it is not hitTestable, and you can then play with the visibility property of the textblock to make it appear when you want (depending on the trigger that would be received if the search did not return any results). You could use other classes also (labels etc…).

    Imported from legacy forums. Posted by Matt (had 2756 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.