Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
WinGrid UI Hangs When Removing element from binding list.
posted

Hi,

I am facing a problem after upgrading my infragistics from 7.3 to 12.1.

I have binded a binding list with the UltraGrid.

Sometimes when calling bindinglist.Remove() method grid goes to hang state permanently.

My Generic function code is:

public void Remove(T item)
{
try
{
if (_dict.ContainsKey(item.GetKey()))
{
T olditem = GetItem(item.GetKey());
base.Remove(olditem);
_dict.Remove(item.GetKey());
}
}
catch (Exception ex)
{
// Invoke our policy that is responsible for making sure no secure information
// gets out of our layer.
bool rethrow = ExceptionPolicy.HandleException(ex, Global.ApplicationConstants.POLICY_LOGANDSHOW);

if (rethrow)
{
throw;
}
}
}

I need urgent help;

Plzzzzzzzzzzzz.

Thanks in advance.

Parents
No Data
Reply
  • 185
    Suggested Answer
    posted

    I have found an temporary workaround for this issue.

    When we set base.RaiseListChangedEvents = true; or call base.ResetBindings() before removing item from the list then wingrid never hangs.

    I want solution for the following topics:

    1. Is there any adverse effect on performance of using base.RaiseListChangedEvents/base.ResetBindings() ?

    2. Same binding list is used in many controls, why we get ui hangs in specific control after upgrading infragistics.?

    My changed generic method code is:

    public void Remove(T item)
    {
    try
    {
    if (_dict.ContainsKey(item.GetKey()))
    {
    T olditem = GetItem(item.GetKey());

    base.RaiseListChangedEvents = true;

    // base.ResetBindings();
    base.Remove(olditem);
    _dict.Remove(item.GetKey());
    }
    }
    catch (Exception ex)
    {
    // Invoke our policy that is responsible for making sure no secure information
    // gets out of our layer.
    bool rethrow = ExceptionPolicy.HandleException(ex, Global.ApplicationConstants.POLICY_LOGANDSHOW);

    if (rethrow)
    {
    throw;
    }
    }
    }

    Thanks

Children
No Data