This is a migrated thread and some comments may be shown as answers.

RadGridView bound to BindingList not updating

2 Answers 102 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 01 Apr 2011, 03:32 PM
Hi All,

I have a RadGridView bound to a BindingList that does not update when I change my BindingList.  Basically, I am traversing my list with LINQ and updating some fields, but these fields are not updating in the RadGridView.

Hers is my code:
var mAgentsInList = from a in cAgentList
              where a.AgentId.ToLower() == p_AgentId.ToLower()
              select a;
foreach (DTLAgent feAgentToUpdate in mAgentsInList)
{
    feAgentToUpdate.OutboundCalls = 99;
    if (p_Direction.ToUpper() == "IN")
    {
        feAgentToUpdate.Direction = "In";
    }
}


The only way I can reflect these changes is by calling:
grdAgents.MasterTemplate.Refresh();

However, this grid has about 300 Agents, and whenever I call this Refresh, the grid scrolls back to the top - which is not something that works for me.

Thanks in advance for any help!

2 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 05 Apr 2011, 08:49 PM
Hello Matt,

Sorry for the very late reply but i've missed this thread. From these code snippets i can't trace the problem, could you perhaps create a very basic example and post it here and i will help you solve this problem.

Best Regards,
Emanuel Varga

Telerik WinForms MVP
0
Julian Benkov
Telerik team
answered on 07 Apr 2011, 08:30 AM
Hi Matt,

To support this scenario, your BindingList items must implement the INotifyPropertyChanged interface. More information and an example you can find in our online documentation.

Regards,
Julian Benkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Matt
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Julian Benkov
Telerik team
Share this question
or