Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Lane Diagram (Read 2966 times)
muthuhamid
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 1st, 2009
Lane Diagram
May 26th, 2009 at 6:13am
Print Post  
Hi

I have lane diagram represents rows and columns (like xl sheet) and the row header will show the sl number (1,2,3...) and column header will be column names(name1,name2,name3...) and iam populating a table from a database and i need to keep the primary key of the each row hidden somewhere to use later identification.

now

1. Is it possible to have rowheader tag so i can keep the value hidden to represent the current row user in editing

2. Can i highlight the entire row with a color that the user editing the cell(shape node inside each cell)


But i dont want to use table node instead lane diagram cos almost i completed the entire things with lane diagram now and i cant start from the scratch again with table node.

Thanks
Hamid

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Lane Diagram
Reply #1 - May 26th, 2009 at 6:58am
Print Post  
Hi,

1. Unfortunately there is no Tag associated with lane grid headers. You have to keep this in an external data structure such as Hashtable.

2. You can do that by assigning a BackgroundBrush to all cells in the row. Here is a code snippet illustrating how to do this (the variable grid identifies the lane grid and the number 5 represents the 0-based index of the row to be highlighted):

Code
Select All
grid[null, grid.GetRow(5)].Style.BackgroundBrush =
      new MindFusion.Drawing.SolidBrush(Color.Yellow); 


Regards,
Meppy
  
Back to top
 
IP Logged
 
muthuhamid
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 1st, 2009
Re: Lane Diagram
Reply #2 - May 26th, 2009 at 7:51am
Print Post  
Thanks Meppy for your prompt reply.

Regarding First Question , if possible to have tag property for the row header in near future release Wink

Thanks
Hamid
  
Back to top
 
IP Logged
 
muthuhamid
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 1st, 2009
Re: Lane Diagram
Reply #3 - May 26th, 2009 at 7:54am
Print Post  
and Regarding second qs

I couldnt see any color over the row?

is there any property should i have to set it up to use this.

Thanks
Hamid
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Lane Diagram
Reply #4 - May 26th, 2009 at 11:47am
Print Post  
The code I provided will color the 6th row in your lane grid in yellow. Therefore you need to have at least 6 rows in your lane grid for it to work. Is that the case?

Regards,
Meppy
  
Back to top
 
IP Logged
 
muthuhamid
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 1st, 2009
Re: Lane Diagram
Reply #5 - May 26th, 2009 at 2:39pm
Print Post  
Hi meppy

Actually i modified the code and use the rowindex value instead of 5 , the code below is the one.

Me._grid(Nothing, Me._grid.GetRow(iRowIndex)).Style.BackgroundBrush = New MindFusion.Drawing.SolidBrush(Color.Yellow)

nothing work out....

do you think as i have the shape nodes in each cell and am i not able to see the color of the row?


-------------------

And now i have one more qs as i said this lane diagram i have shape node in each cell of the rows and columns now i want to show some custom tooltip message for eache shape node in the specific column.

i use the following code to get the shape node on which the mouse is moving but always the node return nothing

Dim point As PointF = Me.docView.ClientToDoc(e.Location)
Dim mnode As DiagramNode = Me.doc.GetNodeAt(point)
If IsNothing(mnode) Then Exit Sub

Console.WriteLine(mnode.Tag.ToString)

Could you pls help me how overcome these issues?

Thanks
Hamid
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Lane Diagram
Reply #6 - May 27th, 2009 at 6:02am
Print Post  
Quote:
do you think as i have the shape nodes in each cell and am i not able to see the color of the row?

The row header doesn't get colored in yellow so if you have nodes completely covering the cells of the row, the change won't be visible. Can you please remove some nodes and see if the underlying cells are painted in yellow?

About the second question, your code appears to be correct as long as the e.Location parameter specifies a device point relative to the DiagramView control. Which is the event you are handling?

Regards,
Meppy
  
Back to top
 
IP Logged
 
muthuhamid
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 1st, 2009
Re: Lane Diagram
Reply #7 - May 27th, 2009 at 6:29am
Print Post  
Thanks for your reply

for 1st qs ill try later ( testing without some shape nodes in the cell) and if i have problem ill come back to you.

And the second one i got fixed now by changing the code as follows


Private Sub docView_mouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles docView.MouseMove

Dim Mousepoint As PointF = Me.docView.ClientToDoc(e.Location)
Dim obj As Object = Me.doc.GetItemAt(Mousepoint, False)


If Not TypeOf (obj) Is MindFusion.Diagramming.ShapeNode Then exit sub

dim mnode as shapenode = ctype(obj,shapenode)


If IsNothing(mnode) Then Exit Sub

Console.WriteLine(mnode.Tag.ToString)



end sub

here i can see the node's tag value printed in the console.

Anyway Thanks for your concern reply... ofcourse you guys are doing fantastic.

Thanks
Hamid

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