Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > treeview new client side events

Reply
Thread Tools

treeview new client side events

 
 
Sohail
Guest
Posts: n/a
 
      11-07-2003
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
 
Reply With Quote
 
 
 
 
HD
Guest
Posts: n/a
 
      11-07-2003
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>");
}
}
}

"Sohail" <(E-Mail Removed)> wrote in message
news:0acf01c3a53e$77adf370$(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute client-side code _after_ client-side validation? Bogdan ASP .Net 2 06-09-2008 01:31 PM
TreeView control, callbacks and client-side events alrotem ASP .Net 0 01-14-2007 03:42 PM
Client side script after client side validation with asp.net 2.0 Boss302 ASP .Net 0 11-21-2006 08:43 AM
Server-side events do not fire the first time after client-side validators have fired Stuart Whiteford ASP .Net 2 04-25-2006 10:10 AM
client side vs server side events for controls Mong ASP .Net 5 05-07-2004 01:20 PM



Advertisments