Page Index Toggle Pages: 1 [2] 3 4 ... 6 Send TopicPrint
Very Hot Topic (More than 25 Replies) how to start on web application with ajax. (Read 36544 times)
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 #15 - Jul 26th, 2007 at 10:23am
Print Post  
Sir , how i can handle javasciprt and ajax on
imagemap.
  
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 #16 - Jul 26th, 2007 at 10:40am
Print Post  
Set the items' HyperLink to a value that executes a script, e.g.:

item.HyperLink = "javascript:someFunction();"

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 #17 - Jul 27th, 2007 at 7:28am
Print Post  
sir
can we add attribute for the events and to be effect of it...
just like this
FlowChart1.Attributes.Add("OnTreeExpanded", "alert(); return false;");
..i m trying with it.
  
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 #18 - Jul 27th, 2007 at 9:27am
Print Post  
At this time the ImageMap mode events can be handled only on the server side. We will implement some limited client side event handling for ImageMap mode in a later release.

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 #19 - Jul 30th, 2007 at 7:05am
Print Post  
Sir
I used to savetostring and loadfromstring method.
hw i can extract value which I used to save to extract information about flowchart to again modifying flowchart and saveto again .
  
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 #20 - Jul 30th, 2007 at 7:25am
Print Post  
Once you load from the string, use the Boxes and Arrows collections of the FlowChart class to enumerate the chart elements and extract their property values.
  
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 #21 - Jul 30th, 2007 at 9:55am
Print Post  
Sir ,
when I am creating box. after that I m saving it as a value . I m expanding node ..now it calls event
handler of expanded tree , it modifying the layout
tree, but problem is that it is not showing expanding node as expanded, even that I hav solved it also by this Way ...
protected void FlowChart1_TreeExpande(objectsender, NodeEventArgs e)
{


FlowChart1.LoadFromString(Convert.ToString(Hiddensaveflowchart.Value));



Hashtable childToParent = new Hashtable();




string expandednodeid = "";


if (e.Node is Box)

{


expandednodeid = e.Node.Tag.ToString();


e.Node.Expandable = true;


e.Node.Expanded = true;




}



chartTable = (SessionDataSet.ScheduleChartDataTable)GetBLSession("ScheduleChartTable");

DataView dv = chartTable.DefaultView;


////filter for the parent

dv.RowFilter = " ParentID = '" + expandednodeid.ToString() + "'";





for (int i = 0; i < dv.Count; i++)

{


string IsDel = dv[i]["IsDelete"].ToString().ToLower() == "false" ? "0" : (dv[i]["IsDelete"].ToString().ToLower() == "true" ? "1" : dv[i]["IsDelete"].ToString());



if (IsDel != "1")




{



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



string nodeID = dv[i]["NodeID"].ToString();



node.Text = dv[i]["NodeName"].ToString();



string parentID = dv[i]["ParentID"].ToString();



node.Tag = nodeID;



node.EnabledHandles = Handles.All;



node.HandlesStyle = HandlesStyle.DashFrame;



node.Expandable = true;



node.Expanded = false;



node.FillColor = Color.Wheat;



childToParent[nodeID] = parentID;


}





}


foreach (Box b in FlowChart1.Boxes)

{


if (!childToParent.ContainsKey(b.Tag))


continue;



FlowChart1.CreateArrow(FlowChart1.FindBox(childToParent[b.Tag]), b);

}


TreeLayout tl = new TreeLayout();

tl.Arrange(FlowChart1);

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 #22 - Jul 30th, 2007 at 10:42am
Print Post  
Is FlowChart1 the same flowchart you are displaying on the form? In that case, e.Node won't be in the chart anymore after calling LoadFromString. LoadFromStrings removed all existing objects from the chart and creates new ones based on the data from the string.

If you are using unique tags, you might get the e.Node.Tag and find the newly loaded node that has the same tag value (call FindBox(tag)). You could use ZIndex as well, knowing that the item at FlowChart.Objects[someBox.ZIndex] is someBox.

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 #23 - Jul 30th, 2007 at 11:13am
Print Post  
Sir,
thanks for this info...now worked fine.
Sir, When I am collepsing node ,after that I am expanding Same node ,its child is coming with duplicates mean it has same childs attaching 2 time
with node.
  protected  void FlowChart1_TreeCollapsed(object sender, NodeEventArgs e)
    {
FlowChart1.LoadFromString(Convert.ToString(Hiddensaveflowchart.Value));
if (e.Node is Box)
      {
    Box a = FlowChart1.FindBox(e.Node.Tag.ToString());
        a.Expandable = true;
        a.Expanded = false;
        a.FillColor = Color.Brown;
        a.Collapse();
         a.Detach();

       }
      
      
     TreeLayout tl = new TreeLayout();
      tl.Arrange(FlowChart1);

       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 #24 - Jul 30th, 2007 at 12:17pm
Print Post  
You are calling CreateBox in the TreeExpanded handler shown a few posts back. Please check if that CreateBox is not executed by chance when expanding.

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 #25 - Jul 30th, 2007 at 1:02pm
Print Post  
Sir
there is any option to remove child node from tree
when we are collapsing any particular node, and after that we save that flowchart by savetostring().

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 #26 - Jul 30th, 2007 at 5:02pm
Print Post  
You can remove a child node by calling FlowChart.DeleteObject(child).

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 #27 - Jul 31st, 2007 at 5:40am
Print Post  
   for (int i = 0; i < rows.Length; i++)
           {
                string childnodeid = rows[i]["NodeID"].ToString();
               Box deletebox = FlowChart1.FindBox(childnodeid);
               FlowChart1.DeleteObject(deletebox);
           }
Sir
I used this code ,Sir after deleting any node,it 
deletes  its child node or not, bydefault..or I have to make code for that, what about to removes arrow prob.. that is cming. myside..
it may bcoz I m not deleting objects of arrow..
May i RIGHT ..hw  to solve it .
  
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 #28 - Jul 31st, 2007 at 5:54am
Print Post  
Child nodes are not deleted automatically. Use a recursive method to iterate over the OutgoingArrows collection, calling the method recursively on the Arrow.Destination node. Delete a node after calling the method for all its child nodes.

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 #29 - Jul 31st, 2007 at 8:06am
Print Post  
Sir
thanks for this info...I worked successfully on it .
Sir , on the page some times when first node is loaded by one method(mean there is only one node on the flowchart), on pageload time at the first time.when I want to expand it ...but it is calling collapsed eventhandler
protected void FlowChart1_TreeCollapsed(object sender, NodeEventArgs e)
and now same node is being collapsed while ..I want to expand it...what reason may be behind of it ?
it is calling expanded event handler on second time and wrking fine.

why it is not calling expand eventhandler at the first time?


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