Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic IndexOutOfRangeException in RowHeaders.Clear() (Read 3275 times)
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 137
Location: England
Joined: Oct 23rd, 2006
IndexOutOfRangeException in RowHeaders.Clear()
May 2nd, 2007 at 1:35pm
Print Post  
When I start a new Lane type diagram, I call the following code.  The trouble is I get a IndexOutOfRangeException when I call grid.RowHeaders.Clear();  Is this a bug in the DLL or am I not using it correctly?

DavidL


       private void InitialiseLanes()
       {
           flowChart.ClearAll();
           flowChart.UndoManager.UndoEnabled = false;
           
           // Initialize grid
           Grid grid = flowChart.LaneGrid;

           grid.RowHeaders.Clear();
           grid.ColumnHeaders.Clear();

           ........

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: IndexOutOfRangeException in RowHeaders.Clear()
Reply #1 - May 2nd, 2007 at 2:55pm
Print Post  
Try setting grid.RowCount and grid.ColunmCount to 0, instead of calling Headers.Clear().

Stoyan
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: IndexOutOfRangeException in RowHeaders.Clear()
Reply #2 - May 3rd, 2007 at 5:08am
Print Post  
This is definitely something that should not happen. Unfortunately I am unable to reproduce it here. Is it possible to send me the stack trace of the exception and/or the initialization code you are using before invoking this method?

Thank you,
Meppy
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 137
Location: England
Joined: Oct 23rd, 2006
Re: IndexOutOfRangeException in RowHeaders.Clear()
Reply #3 - May 3rd, 2007 at 6:42am
Print Post  
The exception does not happen the first time I call this code, but the second time.  i.e. when there are actually rows and columns that I want to clear out in order to start a new chart.

David
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 137
Location: England
Joined: Oct 23rd, 2006
Re: IndexOutOfRangeException in RowHeaders.Clear()
Reply #4 - May 3rd, 2007 at 6:53am
Print Post  
BTW, Stoyan's solution gives the same exception.
David.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: IndexOutOfRangeException in RowHeaders.Clear()
Reply #5 - May 3rd, 2007 at 7:14am
Print Post  
Any chance you can send me your initialization code (particularly the code which initializes the lane header collections before they are cleared)? The exception's stack trace can also be useful.

Thank you,

Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint