Hi Murali,
Thank you for contacting Syncfusion support.
We have analyzed your query. You can achieve your requirement by handling ItemsSourceChanged event. In the event, we have checked with dataGrid.ItemSource as empty or not. If dataGrid.ItemSource as null, then enable the visibility of textblock as shown like below code,
Code Snippet:
this.dataGrid.ItemsSourceChanged += DataGrid_ItemsSourceChanged;
private void DataGrid_ItemsSourceChanged(object sender, GridItemsSourceChangedEventArgs e)
{
if (dataGrid.View != null && (this.dataGrid.DataContext as UserInfoViewModel).UserDetails.Count != 0)
{
txtBlock.Visibility = Visibility.Collapsed;
}
else
txtBlock.Visibility = Visibility.Visible;
}
|
Please let us know if you have any query.
Regards,
Muthukumar K