[Solved] Refreshing grid from BindingList

0 Answers 3 Views
GridView
Carl
Top achievements
Rank 1
Iron
Iron
Iron
Carl asked on 06 May 2026, 06:24 PM

Given the UI below which is bound to BindingLists implementing INotifyChanged interface, I'm seeing some weird behavior.

If I click on  on a top row like Account or Active Contract, the items under it check/uncheck correctly. I'm doing this via the gvGrids_CellEndEdit event like this:

private void gvGrids_CellEndEdit(object sender, GridViewCellEventArgs e)

{

    string formName = e.Row.Cells["FormDescr"].Value.ToString();

    foreach(var item in gridOptionsListDetail.Where(n => n.FormDescr == formName))
    {
        item.Selected = (bool)e.Value;
    }
}

 

The problem occurs when I click on the checkbox to the left of Form. Doing so fires the HeaderCellToggleStateChanged event:

private void gvGrids_HeaderCellToggleStateChanged(object sender, GridViewHeaderCellEventArgs e)

{
    if (e.Column.Name == "Selected")
    {
        ToggleGrids(e.State == Telerik.WinControls.Enumerations.ToggleState.On);

        gvGrids.MasterTemplate.Refresh();

        gvGrids.TableElement.Update(GridUINotifyAction.DataChanged);
    }
}

 

This event will check the Account and Active Contract checkboxes and the ToggleGrids() method will check the Selected property in the underlying BindingList but the subgrid will not refresh unless I scroll down and up again. The weird thing is that If I click the Select All/Deselect All links, which call the same ToggleGrids() method, all works well.

 

What am I missing here?

Thanks

Carl

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Carl
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or