Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Enter Data (Read 6086 times)
gurram
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 1st, 2009
Enter Data
Oct 1st, 2009 at 2:10pm
Print Post  
Hi
I am using mindfusion for my flowchart in asp.net
for that i am using netdiagraming
i am running flowcharter from samples..so i am using that.
my question is wheni drap and drop a circle,i want enter name of that circle as cirlce1.but how can i enter text
second question if it YES condition i am going to another shape if NO condition remains same..HOw can i dispaly text like yes  and noat the top of the arrows

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Enter Data
Reply #1 - Oct 2nd, 2009 at 8:02am
Print Post  
Hi,

1. You could call DiagramView.beginEdit(args.getNode()) from the NodeCreatedScript. For example check the PdfExporter sample project.

2. Call DiagramLink.setText().

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
gurram
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 1st, 2009
Re: Enter Data
Reply #2 - Oct 6th, 2009 at 2:37pm
Print Post  
Hi,

i am using
Code
Select All
 var node = args.getNode();
	  node.setText("edit me!");
	  <%=diagramView.AppletElement%>.getDiagramView().beginEdit(node);
 


.i am getting these from pdfexporter samples..how can i increse font and its colour


2:DiagramLink.setText();;;
can you give some example where i can call  this method ..any example will be appriciated
  
Back to top
 
IP Logged
 
gurram
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 1st, 2009
Re: Enter Data
Reply #3 - Oct 6th, 2009 at 3:37pm
Print Post  
one more question stoyo

iam using  ModificationStart="AutoHandles" in ndiagramview
so after selecting node if i enter delete button the node will deleted..but is it possible to popout window  "are you sure you want delete yes or no "when the time of delete..can you give sample code or any example

Thanks for your time
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Enter Data
Reply #4 - Oct 6th, 2009 at 3:43pm
Print Post  
Try this:

Code
Select All
<DiagramView NodeDeletingScript = "onNodeDeleting" ... >

function onNodeDeleting(sender,args)
{
	if (!confirm('Are you sure?'))
		args.setCancel(true);
}
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Enter Data
Reply #5 - Oct 7th, 2009 at 5:38am
Print Post  
Regarding the previous questions, you could do the following:

node.setFont(scriptHelper.createFont(fontName, fontSize));
node.setTextColor(scriptHelper.createColor(r, g, b));

You can set the LinkText property to have some default text for new links, and later call setText() in response to some UI events on the client side, e.g. from the LinkModifiedScript.
  
Back to top
 
IP Logged
 
gurram
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 1st, 2009
Re: Enter Data
Reply #6 - Oct 7th, 2009 at 2:46pm
Print Post  
Hi stoyo
is it possible to get nodetype.

for example if i have 3 nodes
start,decision,terminator..
when i double click on a node it will oepn a new window.i want like this will occur only for decision node ..i dont want to this for start node and terminator node

for that i think i  need node type for example decision, process...can you give some expamle or code how can i get node type also.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Enter Data
Reply #7 - Oct 8th, 2009 at 7:22am
Print Post  
Hi,

Check the ID of the node's Shape:

if (args.getNode().getShape().getId().equals('Decision'))
     openWindow();

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
gurram
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 1st, 2009
Re: Enter Data
Reply #8 - Oct 8th, 2009 at 1:51pm
Print Post  


   HI ,

      I was used which you have sent the code in nodedoubleclicked event


function onNodeDoubleClicked(sender, args)

{
if (args.getNode().getShape().equals('Decision'))
         
     confirm_delete();


}
function confirm_delete()
{

if (confirm("IF you want to Create the page Press Ok Otherwise to Edit press Cancel?")==true)
   myRef = window.open('Add.aspx','mywin','left=20,top=20,width=500,height=500,toolbar=1,re
sizable=0');

else
   myRef = window.open('Edit.aspx','mywin','left=20,top=20,width=500,height=500,toolbar=1,r
esizable=0');

}


<ndiag:DiagramView ID="diagramView" runat="server" Style="left: -1px; width: 1000px;
           position: absolute; top: 13px; height:550px"
           NodeDoubleClickedScript="onNodeDoubleClicked" NodeCreatedScript="onNodeCreated"
         >
</ndiag:DiagramView>



Actually Iam using the confirm Message when decision node is double clciked.But iam not getting the confirm message box.Can You please suggest me in the code.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Enter Data
Reply #9 - Oct 8th, 2009 at 2:14pm
Print Post  
Hi,

I think you've missed the getId() call after getShape().

Stoyan
  
Back to top
 
IP Logged
 
gurram
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 1st, 2009
Re: Enter Data
Reply #10 - Oct 8th, 2009 at 2:41pm
Print Post  

  Hi,

     I used the getid() still not gettting the confirm message box.

function onNodeClicked(sender, args)

{

         
     if (args.getNode().getShape().getId().equals('Start'))
         
     confirm_delete(); 
}
function confirm_delete()
{

if (confirm("IF you want to Create the page Press Ok Otherwise to Edit press Cancel?")==true)
   myRef = window.open('Add.aspx','mywin','left=20,top=20,width=500,height=500,toolbar=1,re
sizable=0');

else
   myRef = window.open('Edit.aspx','mywin','left=20,top=20,width=500,height=500,toolbar=1,r
esizable=0');

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Enter Data
Reply #11 - Oct 8th, 2009 at 4:32pm
Print Post  
Hi,

This should work:

if (args.getNode().getShape().getId() == 'Start')

Stoyan
  
Back to top
 
IP Logged
 
gurram
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 1st, 2009
Re: Enter Data
Reply #12 - Oct 8th, 2009 at 4:39pm
Print Post  
Great, it's working..

i have one more question..is it possible to chane shape names..that means..if i have a shape in shapelist box named circle beside of it. can i chaneg the name for that shape..for cirlce i want to ginve name workstation1  and for Decision i want to give name work station2..how can get this .please send me somecode

Thanks you so much
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Enter Data
Reply #13 - Oct 8th, 2009 at 4:49pm
Print Post  
I think the listbox displays the string returned by Shape.DisplayName property, which by default is the same as the shape id. You could change a shape's display name on the client side like this:

Shape.fromId("Decision").setDisplayName("station2");

Do that before adding the shapes to the listbox, or otherwise also call the invalidateShapeAt() method.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint