ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2014-07-01 15:36:19

fjzwjlfnx
Member
Registered: 2014-06-17
Posts: 7

Exception occurs when removing 'Text Wrap' setting from entire grid

Version: 0.8.6.2

1:when  grid  have only one  column, I use  grid.DeleteCols(0,1) to  delete  this column,   throw  an exception.


2: select  all  cells, click  'Text Wrap' button, click  'Text Wrap' button  again to  remove  text wrap,an error occured.

Offline

#2 2014-07-02 03:53:16

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Exception occurs when removing 'Text Wrap' setting from entire grid

Thanks for report!

1. Grid must have at least one cell (one row or one column), but exceptions should be handled in Editor.
2. Bugs in remove styles processing. (Missing null reference checking)

They will be fixed in next version.

Offline

#3 2014-07-03 01:27:01

fjzwjlfnx
Member
Registered: 2014-06-17
Posts: 7

Re: Exception occurs when removing 'Text Wrap' setting from entire grid

Hello Jing:
      I Find   a new  Bug, version:0.8.6.2:
     When  I    double    click  mouse     out of all grid  range, throw an exception,how  can I  solve this problem? 
     thank you!

Offline

#4 2014-07-05 04:03:00

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Exception occurs when removing 'Text Wrap' setting from entire grid

Try this code:

grid.FocusPosChanged += (s, e) =>
			{
				var pos = grid.FocusPos;
				if (pos.Row >= grid.RowCount)
					pos.Row = grid.RowCount - 1;
				if (pos.Col >= grid.ColumnCount)
					pos.Col = grid.ColumnCount - 1;
				if (grid.FocusPos != pos) grid.FocusPos = pos;
			};

Offline

Board footer

Powered by FluxBB