Page Index Toggle Pages: 1 2 [3] 4 5 6 Send TopicPrint
Very Hot Topic (More than 25 Replies) how to start on web application with ajax. (Read 36545 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to start on web application with ajax.
Reply #30 - Jul 31st, 2007 at 12:43pm
Print Post  
Does the expand/collapse button display the "+" or "-" icon? Try setting root.Expanded = false for the initial box you create. That should set the icon to "+" and clicking it will trigger the Expanded event.

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


I love YaBB 1G - SP1!

Posts: 40
Joined: Jul 24th, 2007
Re: how to start on web application with ajax.
Reply #31 - Jul 31st, 2007 at 12:49pm
Print Post  
Sir
I have already Set node.expanded = false..it showing "+" sign...I m clicking on "+ " and its calling collapsed eventhandler.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to start on web application with ajax.
Reply #32 - Jul 31st, 2007 at 1:04pm
Print Post  
What URL is shown in the browser's status bar when the mouse hovers over the "+" icon?
  
Back to top
 
IP Logged
 
kirtesh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 40
Joined: Jul 24th, 2007
Re: how to start on web application with ajax.
Reply #33 - Jul 31st, 2007 at 1:14pm
Print Post  
javasript:document.getelementbyid(_mfusion_ct100_pageholder_flowchart_clickedite
m').value='0:-1:-1:0';_dopostBack('ct100$...
just like this .

Sir
this prob. is coming only when I am expanding all flowcharts object..of one object just related to any
name, without collepsing all node I go to other object and create first node for that.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to start on web application with ajax.
Reply #34 - Aug 1st, 2007 at 6:29am
Print Post  
This work pretty well:

Code
Select All
protected void Page_Load(object sender, EventArgs e)
{
	if (!IsPostBack)
	{
		fc.CreateBox(20, 20, 50, 40).Expanded = false;
	}
}
protected void fc_TreeExpanded(object sender, MindFusion.Diagramming.WebForms.NodeEventArgs e)
{
	fc.CreateArrow(fc.Boxes[0], fc.CreateBox(20, 40, 50, 40));
	TreeLayout tl = new TreeLayout();
	tl.Arrange(fc);
}
 



Check whether your Collapsed method is not attached to the Expanded event by some chance. Also make sure there isn't any box overlapping the root node.

Stoyan
  
Back to top
 
IP Logged
 
kirtesh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 40
Joined: Jul 24th, 2007
Re: how to start on web application with ajax.
Reply #35 - Aug 1st, 2007 at 7:54am
Print Post  
<ndiag:FlowChart ID="FlowChart1" runat="server" ClientSideMode="ImageMap" ExpandButtonAction="ExpandTreeBranch" ExpandButtonPosition="OuterRight" BoxHandlesStyle="DashFrame" ControlHostsExpandable="true" BoxClickedScript="FlowChart1_BoxClicked" ActiveMnpColor="Silver" style=" height:500px; width:350px" TreeExpandedScript="onTreeExpanded" OnBoxClicked="FlowChart1_BoxClicked" OnTreeExpanded="FlowChart1_TreeExpanded" OnTreeCollapsed="FlowChart1_TreeCollapsed" TreeCollapsedScript="onTreeCollapsed" ></ndiag:FlowChart>

Sir , I a m using it on .aspx page..also I am clearing
flowchart everytime when object related to flowchart is changed by flowchart1.clearall();
on load of first node...

private void PopulateFirstNode1()
{



Hashtable childToParent = new Hashtable();

FlowChart1.BackBrush = new MindFusion.Drawing.SolidBrush(Color.White);

FlowChart1.Behavior = BehaviorType.FlowChart;

FlowChart1.ClearAll();



Hiddensaveflowchart.Value = "";

chartTable = new CarePlan().GetTreeForPatient(((Patient)GetBLSession(Constants.CURRENT_PATIENT)).
PatientID);

SetBLSession("ScheduleChartTable", chartTable);

SaveBLSession();



if (chartTable.Rows.Count > 0)

{


SessionDataSet.ScheduleChartRow row = chartTable.NewScheduleChartRow();


DataRow[] drRow = chartTable.Select("NodeId = 0");


row = (SessionDataSet.ScheduleChartRow)drRow[0];


if (!Convert.ToBoolean(row.IsDelete))


{





FlowChart1.BackBrush = new MindFusion.Drawing.SolidBrush(Color.White);


FlowChart1.Behavior = BehaviorType.FlowChart;



// defaults for newly created boxes


FlowChart1.BoxBrush = new MindFusion.Drawing.LinearGradientBrush(Color.ForestGreen, Color.Wheat, 30);


FlowChart1.DefaultShape = MindFusion.Diagramming.WebForms.ShapeTemplate.FromId("Rectangle");



// // create the root box



Box rootNode = FlowChart1.CreateBox(0, 0, 15, 10);


//// fc. Box root = fc.CreateBox(5, 5, 25, 16);


rootNode.FillColor = Color.Wheat;


rootNode.Text = row.NodeName;


rootNode.Tag = row.NodeID.ToString();





rootNode.EnabledHandles = Handles.All;


rootNode.HandlesStyle = HandlesStyle.DashFrame;


rootNode.Expandable = true;


rootNode.Expanded = false;


rootNode.AllowOutgoingArrows = true;


rootGroup = FlowChart1.CreateGroup(rootNode);




















}




}






Hiddensaveflowchart.Value = FlowChart1.SaveToString();
}









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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to start on web application with ajax.
Reply #36 - Aug 1st, 2007 at 8:51am
Print Post  
Could you also post your Page_Load code? What are you doing with that Hiddensaveflowchart.Value? If you load it later in the Page_Load event handler, it might restore some old state of the +/- button and raise the wrong event.

Stoyan
  
Back to top
 
IP Logged
 
kirtesh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 40
Joined: Jul 24th, 2007
Re: how to start on web application with ajax.
Reply #37 - Aug 1st, 2007 at 10:05am
Print Post  
yes sir , I m using hiddensaveflowchart.value in the code on the time of event handler of treecollapsed,treeexpanded and saving there again code ...and reutilizing in other events just like expending ....
its happening only in the case
1. when tree is expended of one object
,without fully collepsing it goes to other object...there rootnode is created as given above...I am saving that code..in hiddensaveflowchart.value , and its
calling collapse event handler ...I m using callbackevent handler for choosing anothor object....on that time its creating.

when I am loading first time for any  patient(object of my project) its clearing all data by clearall()
but showing flowchart.boxes.capacity of previous patient ...and count is showing 1 .
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to start on web application with ajax.
Reply #38 - Aug 2nd, 2007 at 5:40am
Print Post  
I cannot understand much of your description. Please email your application, or a smaller project that reproduces just that problem, to support@mindfusion.eu.
  
Back to top
 
IP Logged
 
kirtesh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 40
Joined: Jul 24th, 2007
Re: how to start on web application with ajax.
Reply #39 - Aug 2nd, 2007 at 7:03am
Print Post  
sir , given above prob.  has been solved ..thr was overlapping problem..
thanks .
Sir , how to remove scroll in the imagemap...I dont want to display scrollbar..it shown only when the
space is required than the available space.
when I make the width and hight small...then also showing this ...but there is no need of that...
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to start on web application with ajax.
Reply #40 - Aug 2nd, 2007 at 9:11am
Print Post  
The image generated by NetDiagram is placed in a scrollable DIV, and the scrollbars appear only if the image is larger than the DIV. Set a smaller DocExtents to make the image smaller, or call FitDocToObjects to make the image just big enough to contain all items in the diagram.

Stoyan
  
Back to top
 
IP Logged
 
kirtesh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 40
Joined: Jul 24th, 2007
Re: how to start on web application with ajax.
Reply #41 - Aug 4th, 2007 at 10:37am
Print Post  
Sir ,
I want to access the box size according to box.text
some time when my contain is large then some data is not shown...hw to set the size of box according to text in box...
Is thr not any method which sets the size according to text.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to start on web application with ajax.
Reply #42 - Aug 6th, 2007 at 6:47am
Print Post  
Yes, call Box.FitSizeToText to resize the box so that the text fits. Or use the FlowChart.MeasureString method to find out a size that will fit the text and resize the box yourself by setting its BoundingRect.

Stoyan
  
Back to top
 
IP Logged
 
kirtesh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 40
Joined: Jul 24th, 2007
Re: how to start on web application with ajax.
Reply #43 - Aug 7th, 2007 at 4:34am
Print Post  
I dont want to apply postback and cursor on arrow..
on clicking arrow my page is being postback.
what i hav to do?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to start on web application with ajax.
Reply #44 - Aug 7th, 2007 at 5:40am
Print Post  
Try setting the arrows' Hyperlink to "javascript: void(0)".

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 4 5 6
Send TopicPrint