Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Grid - GetCellRow give me a wrog index (Read 3655 times)
alesdario
Junior Member
**
Offline



Posts: 71
Joined: Mar 7th, 2007
Grid - GetCellRow give me a wrog index
Feb 5th, 2009 at 10:53am
Print Post  
Hi stoyo. I've got a problem with

1) a LaneGrid method.

Code
Select All
void flow_MouseClick(object sender, MouseEventArgs e)
        {

                FlowChart flow = (FlowChart)sender;
                Grid grid = flow.LaneGrid;

                PointF clickPosition = e.Location; //click's position
                RectangleF rec = RectangleF.Empty;
                ICell cell = grid.GetCellFromPoint(clickPosition, ref rec);
                int indexSelectedLane = grid.GetCellRow(cell);
                if (indexSelectedLane >= 0)
                {
                    string formatoTesto = "Arial";
                    grid.RowHeaders[indexSelectedLane ].TitleFont = new System.Drawing.Font(formatoTesto, 8, System.Drawing.FontStyle.Bold);
                 }

            } 

the index returns me grid.GetCellRow is always 1 or 0 even though my flow have more lanes and i click on the fourth lane.

2) is possible to insert new lane between two lanes?

tanks
Alessandro
  
Back to top
 
IP Logged
 
alesdario
Junior Member
**
Offline



Posts: 71
Joined: Mar 7th, 2007
Re: Grid - GetCellRow give me a wrog index
Reply #1 - Feb 5th, 2009 at 11:09am
Print Post  
I think i've solved the problem ... MouseClick doesn't returns the position relative to the 0,0 point of the chart but it's relative to the 0,0 point of the displaied chart ... how can i solve ... ? mmm
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Grid - GetCellRow give me a wrog index
Reply #2 - Feb 5th, 2009 at 12:19pm
Print Post  
1) Try converting e.Location to flowchart coordinates using the ClientToDoc method.

2) Version 5.2 adds InsertBefore and InsertAfter methods that will let you do that:
http://mindfusion.eu/Forum/YaBB.pl?board=fcnet_disc;action=display;num=123307034...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
alesdario
Junior Member
**
Offline



Posts: 71
Joined: Mar 7th, 2007
Re: Grid - GetCellRow give me a wrog index
Reply #3 - Feb 6th, 2009 at 10:13am
Print Post  
Stoyo wrote on Feb 5th, 2009 at 12:19pm:
1) Try converting e.Location to flowchart coordinates using the ClientToDoc method.
it works. Tanks

Stoyo wrote on Feb 5th, 2009 at 12:19pm:
2) Version 5.2 adds InsertBefore and InsertAfter methods that will let you do that:
http://mindfusion.eu/Forum/YaBB.pl?board=fcnet_disc;action=display;num=123307034...
Are there some incompatibility with 4.3 version?

Tanks for yours always very excellent support
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Grid - GetCellRow give me a wrog index
Reply #4 - Feb 6th, 2009 at 10:30am
Print Post  
There are some differences.

Stoyan
  
Back to top
 
IP Logged
 
alesdario
Junior Member
**
Offline



Posts: 71
Joined: Mar 7th, 2007
Re: Grid - GetCellRow give me a wrog index
Reply #5 - Feb 6th, 2009 at 12:09pm
Print Post  
where can i find information about my license and his upgrade?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Grid - GetCellRow give me a wrog index
Reply #6 - Feb 6th, 2009 at 12:56pm
Print Post  
send me a private message with your company name and I will check in our records.
  
Back to top
 
IP Logged
 
alesdario
Junior Member
**
Offline



Posts: 71
Joined: Mar 7th, 2007
Re: Grid - GetCellRow give me a wrog index
Reply #7 - Feb 12th, 2009 at 8:59am
Print Post  
Now, i've got a new problem. When i select the right selected lane, i want to change her header background brush. I set the property
Code
Select All
grid.RowHeaders[newIndex].Style.BackgroundBrush = new MindFusion.Drawing.SolidBrush(Color.DarkGray); 

but it change not all header's area (for example only 50%, it depends to the mouseclick position). FlowChart grid seems need to be reloaded, how can i do this?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Grid - GetCellRow give me a wrog index
Reply #8 - Feb 12th, 2009 at 9:37am
Print Post  
Do you have some sub-lanes and child headers in the grid?
  
Back to top
 
IP Logged
 
alesdario
Junior Member
**
Offline



Posts: 71
Joined: Mar 7th, 2007
Re: Grid - GetCellRow give me a wrog index
Reply #9 - Feb 19th, 2009 at 8:49am
Print Post  
No, i don't
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint