Showing posts with label approach. Show all posts
Showing posts with label approach. Show all posts

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