Can anyone confirm that DataBindingComplete is NOT firing on RadDataGrid when bound to a DataTable?

1 Answer 146 Views
DataGrid
Christopher
Top achievements
Rank 2
Iron
Iron
Christopher asked on 10 May 2022, 12:56 AM

I've tried everything I can think of. The documentation says:

Occurs when the associated data (ItemsSource) has been successfully bound to the control or any data operation like Group, Sort or Filter is applied. This event is useful if an additional action is required once the data is ready to be visualized.

But in none of those circumstances is this event firing for me. I was particularly hoping for it to fire after Grouping, Sorting, and/or Filtering through the UI.

1 Answer, 1 is accepted

Sort by
1
Accepted
Yana
Telerik team
answered on 13 May 2022, 01:38 PM

Hi Christopher,

I confirm this is an issue on our side related to the DataBindingComplete event - I have logged it as a bug report on your behalf in our public feedback portal, you can check it at the following link:

DataGrid: DataBindingComplete event is not fired after the ItemsSource has been bound.

I've updated your points for reporting this issue.

For now, as a workaround, you can use the DataBindingComplete command instead:

public class GridDataBindCommand : DataGridCommand
{
    public GridDataBindCommand()
    {
        Id = DataGridCommandId.DataBindingComplete;
    }
    public override bool CanExecute(object parameter)
    {
        return true;
    }
    public override void Execute(object parameter)
    {
        var context = parameter as DataBindingCompleteEventArgs;
        this.Owner.CommandService.ExecuteDefaultCommand(DataGridCommandId.DataBindingComplete, parameter);
    }
}

I've tested it and it works properly in the scenario when the DataGrid is bound to a DataTable, please give it a try.

I am sorry for any inconvenience caused.

Regards,
Yana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
DataGrid
Asked by
Christopher
Top achievements
Rank 2
Iron
Iron
Answers by
Yana
Telerik team
Share this question
or