Showing posts with label tree. Show all posts
Showing posts with label tree. Show all posts

Wednesday, March 28, 2012

Ajax based navigation scheme

Hello,

I am trying to implement Ajax based navigation schema for a complex web application.

Basically, I will have a tree on the left. When item is clicked I want the content area on the page to load some content via Ajax (instead of refreshing the whole page).

I got somewhat far with having an update panel around content area and loading content via custom user controls (e.g. panel.Controls.Add(Page.LoadControl("blah.ascx")) ). However, I am running into some issues with this approach (for complex controls it appears this dynamic loading is breaking javascript etc). Can someone suggest any other mechanism one might use to implement this? Keep in mind, controls cannot be hardcoded on the page and need to come from an external file (e.g. the tree would load from xml file that specifies which controls correspond to which item on the tree).

Thanks

Unless I'm missing something, it sounds like you'd be better off using an IFRAME for your content area and just change it's .src with the navigation system.

Monday, March 26, 2012

Ajax Approach

Hi all,

Well my query is regarding the optimal use of ajax,I have to build a user control that is functioning of tree view .example

There are three pane

1.In fist pane there is a tree view

2 In 2nd pane ,contain the list that is populated on click of a node(on text click)

3 In third pane when i double click the item of second pane it should moved into 3rd pane.

4.when i clicked on the node of the tree its child should filled from the database (this is imp one as no whole page should be post back only that node part should generated here i take a help of ajax)

Any any kind of help will contribute to me.

thanks

My suggested approach will be this:

1. Send requests for data to server side via SriptMethod on page or WebMethod on ScriptService .

2. Get the data as objects to client side (It will be if you're working with JSON)

3. Handle all UI changes in client side (Fore example: expand node on callback function - after you've received data from server)


Thanks its good and will work fine i hope iam still searching for good .

what approach is better ie use a .net treeview control in update panel or make a ajax call on clicking on each node i know the 2nd one is good but i need some more facts like if i used ist one and when a node clicked event is generated then whole tree view is posted but in second one there is on demand loading

please send some more views

thanks

Saturday, March 24, 2012

Ajax and Web custom Control

Hi all ,

Can any budy tell the approach for building a treeview web custom control using ajax

I cant getting the idea of rendring the tree view(HTML for Tree view ie using ajax)

Any help

Hi

Have you tried nested Datalists?

Thanks


No Jin

Nerver Header give some hint...

Another thing ,i start to build the tree using ul and li of html tag and rendering in the following manner

protected void BuildDivContainingTree(HtmlTextWriter output)
{

// Start building the HTML
output.Write("<div><ul><li>");
output.Write("<table><tr><td><IMG src='../../images/minus.gif'></td><td style='cursor:hand' onclick='onTextClicked(0,0);'>");
output.Write("<font color=red>");
output.Write(this.BaseNodeText + "</font></td></tr></table>");
output.Write("<div id='treeview_0'></div><div id='DivInPage'></div>");
output.Write("</li></ui>");

output.Write("<script>document.onreadystatechange=StartLoading('" + this.Type + "')</script>");

}

now i want to send a ajax cal for filling the node of the tree...

what should i do ?

as i created in the custom control i send a request to a aspx page and execute server function and place the out as response text as xml dox and render it in <li> inner text .

any suggestions

Ajax and UserControl from scratch

Hi all,

Iam building a web custom control from scratch ir no server control is used ..so how i implement ajax in this.

Example:i created a tree view using <ul><li> and when i clicked the node i call a javascript function for filling the data now where i write this function so that every call to this function is asynchronous

please help me out

Hi Spanco,

Partial Update Treeview is a complex and big project, so sorry we cannot provide a working sample as what you want to get.However, in my opnion, I think you may use Ajax + Div + WebService. Fortunately, I have found some urls related what you are concerning. Here they are:

1.http://www.codeproject.com/useritems/TreeViewAjax.asp

2.http://www.codeproject.com/Ajax/IntroAjaxASPNET.asp

3. http://ajaxaspects.blogspot.com/2006/01/tree-view-ajax-control.html The sample url:http://www.mathertel.de/AjaxEngine/S03_AJAXControls/TreeView.aspx . You can get the source code here and I hope that you can benefit from it. This sample is using Ajax + XML +WebService.

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

I hope this help.

Best regards,

Jonathan