I'm trying to use a button to clear the results in my grid (see example below) and it works fine except for when I have focus on a child element of an expanded row. If the focus is on any row that isn't a child then the clear button works without issue. The error is "Object reference not set to an instance of an object." for grdResults.DataSource. where grdResults is the Telerik.WinControls.UI.RadGridView
private void cmdClear_Click(object sender, EventArgs e)
grdResults.DataSource = null;
If the focus is on a child element when the clear button is clicked do I need to change focus to a non-child row and then set the DataSource to null?