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
125
ultraGrid1.CurrentState causes InitializeRow called
posted

Hi, there:

I am using Infragistics UltraGrid v6.2.2. Inside grid_InitializeRow event handler I have the following line which causes the InitializeRow method called recursively.

UltraGridState s = m_grid.CurrentState;

Eventually, I got stack over flow exception. Can anybody tell me why?

I originally tried to color the cells and force the cells out of edit mode if the cells are in edit mode. The code is as the following:

private void m_grid_InitializeRow(object sender_, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e_)

{

    colorRow(e_.Row);

    if ((m_grid.CurrentState & UltraGridState.InEdit) == UltraGridState.InEdit)

   {

      m_grid.PerformAction(
UltraGridAction.ExitEditMode, true, false);
     m_grid.ActiveCell = null;

   }

 

 

}

This method throws stack over flow exception when I have a lot of rows in the grid. I found out the fault party is: m_grid.CurrentState

Any help is appreciated.