Suggest StandardBehavior

Sep 9, 2009 at 12:42 AM

StandardBehavior

Line 113

 

        
/// <summary>
/// Fired when the SetValue method is called.
/// </summary>
/// <param name="e"></param>
public override void OnValueChanged(CellContext sender, EventArgs e)
{
base.OnValueChanged(sender, e);
if (sender.Grid!=null)
sender.Grid.InvalidateCell(sender.Position);

}

 

/// <summary>

/// Fired when the SetValue method is called.

/// </summary>

/// <param name="e"></param>

public override void OnValueChanged(CellContext sender, EventArgs e)

{

base.OnValueChanged(sender, e);

 

//if (sender.Grid!=null)

// sender.Grid.InvalidateCell(sender.Position);

}

 

Coordinator
Sep 9, 2009 at 6:40 AM

Could you describe in words?

 

Sep 9, 2009 at 6:55 AM

when i set the value like this

for(int r = 0; r < 500000; r++)

{

for(int c = 0; c < 10; c++)

grid[r, c].Value = "Hello";

}

I found that it takes a long time.

Value Changed -> StandardBehavior.OnValueChanged every time

 

Coordinator
Sep 10, 2009 at 8:55 AM

Have you tried calling grid.Suspend and grid.Resume  before and after your code ?


The function names might be a little different, but idea is to suppress redraw after the cell is changed each time. The functions i mentioned could help in this scenario