treeview new client side events

S

Sohail

Does anyone know how to add 'onadd' and/or 'ondelete'
events for the treeview?

I want to be able to add/delete nodes to the treeview
client-side and then postback to the server and let it do
it's thing.

Thanks,

Sohail
 
H

HD

you will need to do somethng like this

public class CustomPager : System.Web.UI.WebControls.WebControl ,
IPostBackEventHandler
{
public void RaisePostBackEvent(string eventArgument)
{
if ( eventArgument == "NextSet" )
CurrentOffset += NoOfPageLinks;
else if( eventArgument == "PrevSet" )
CurrentOffset -= NoOfPageLinks;
else
{
CurrentPage = int.Parse(eventArgument);
}
this.Parent.Load += Page.Page_Load();
}

protected override void Render(HtmlTextWriter writer)
{
int start =0;
int end = 0;

start = CurrentOffset;
end = CurrentOffset + NoOfPageLinks;

end = (end > TotalPages ? TotalPages+1 : end);

writer.Write("<table cellspacing=0 cellpadding=0 border=0
width=100%><tr>");
writer.Write("<td align=left width=50>");
if((start-NoOfPageLinks) > 0)
{
writer.Write("<a href=\"javascript:" +
Page.GetPostBackEventReference(this,"PrevSet") + "\"><font
color=black>&lt;&lt;</font></a>");
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top