Span exception after sort

Jan 26, 2010 at 4:52 PM

Hi!

I make a minimal span test inherited from frmSample21.cs.

private void DoFull()
{
    grid1.Redim(20, 4);
    grid1.FixedRows = 1;

    grid1[0, 0] = new MyHeader("1");
    grid1[0, 0].ColumnSpan = 3;
    grid1[0, 0].AddController(new SourceGrid.Cells.Controllers.SortableHeader());
    grid1[0, 3] = new MyHeader("2");
    grid1[0, 3].AddController(new SourceGrid.Cells.Controllers.SortableHeader());

    for (int r = 1; r < grid1.RowsCount; r++)
    {
        if (r % 2 == 0)
        {
            grid1[r, 0] = new SourceGrid.Cells.Cell("nospan" + r.ToString(), typeof(string));
            grid1[r, 1] = new SourceGrid.Cells.Cell("span" + r.ToString(), typeof(string));
            grid1[r, 1].ColumnSpan = 2;
        }
        else
        {
            grid1[r, 0] = new SourceGrid.Cells.Cell("span" + r.ToString(), typeof(string));
            grid1[r, 0].ColumnSpan = 2;
            grid1[r, 2] = new SourceGrid.Cells.Cell("nospan" + r.ToString(), typeof(string));                    
        }

        grid1[r, 3] = new SourceGrid.Cells.CheckBox("CheckBox Column/Row Span", false);
    }

    grid1.AutoSizeCells();
}

When i sort it by the first column, occuors an exception in GetSpannedCell function. Maybe the spannedCellReferences is inconsistent with the actual (sorted ) real spanrangelist?

Thanks tancy

Coordinator
Feb 5, 2010 at 7:24 AM

Hi,

 

Thanks for this report. I tested and it seems that this is a bug in the spanning algorithm, since the exception says that it excepts to find a spanned cell, but does not find that.

 

Could you please create an issue for this bug?

Feb 5, 2010 at 8:07 AM

The issue is reported.

Thank you for your response.