This project is read-only.

Misbehaviour after adding rows?

Oct 10, 2009 at 4:26 PM


I've got a filled SourceGrid with a ColSpan over two Columns in one row.

The colspanned Cell is selectable. If I add a rows range at row at row-position zero, however,

it is not selectable afterwards.

I have some code which produces this problem again. Is it a bug or am I using the grid the wrong way?

grid1.Redim(8, 8);

for (int i = 0; i < grid1.Rows.Count; i++)


for (int k = 0; k < grid1.Columns.Count; k++)


grid1[i, k] =
new SourceGrid.Cells.Cell("test", typeof(string));



grid1[5, 2] = null;

grid1[5, 1].ColumnSpan = 2;

grid1.Rows.InsertRange(0, 3);

string reportName = "test1", header = "test2", footer = "test3";

grid1[0, 0] = new SourceGrid.Cells.Cell(reportName, typeof(string));

grid1[1, 0] = new SourceGrid.Cells.Cell(header, typeof(string));

grid1[2, 0] = new SourceGrid.Cells.Cell(footer, typeof(string)); 

Thanks in advance for any help!
Oct 13, 2009 at 2:25 PM

There was a bug with col/span behaviour.


Could you please update to trunk version and tell if it works correctly. If not, please report here what does not work, i will fix it

Oct 13, 2009 at 2:36 PM
I already updated to the Trunk-Version.
If I use addRange to add rows to my grid I cant select cells with colspan.
And it seems that there are bad connections between cells. once i added 3 rows using cell range and after I got a message using colspan, that a cell in 4th row intersects with a cell in 7th row. And I dont use rowspanning at all.
And this diffence 4 to 7 might have sth to do with adding 3 rows. But I dont have the code...My solution was to add 3 times one row. Its not that elegant but it works. But for more that 3 rows it might be nasty ;)
Oct 14, 2009 at 6:15 AM

Hi zerbmaster,

yes, the problem is because of adding 3 rows.  i was a bit too fast to ask you to check trunk version, sorry ;)

I've commited yet even more unit-tests and fixes for spanning algorithm, but it is still not complete.

I believe this weekend i will be able to finish up everything, and you will be good to use from then on ;)

Oct 14, 2009 at 6:05 PM

Hi zerbmaster, i've worked a little more on it.


Please have a look at sample 21. I added a context menu, so user can add and remove rows as need. So far it seems adding and removing now works fine, but if you find any bugs, please report.


Column adding does not work yet, but i will work on it soon