This is a migrated thread and some comments may be shown as answers.
RadListBox Events
2 Answers 116 Views
This is a migrated thread and some comments may be shown as answers.
Ali Kitabi
Top achievements
Rank 1
Ali Kitabi asked on 11 May 2010, 11:03 PM
Hi,

I am trying to register events on the RadListBox but whatever I do the event never fires for OnInserted, OnInserting, OnTransferred and OnTransferring. The only event that does get fired is the OnDeleted event. I have tried to register events in the markup and in code-behind to vain.

Please help me out with this.

Regards,

Ali

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 12 May 2010, 07:27 AM
Hello Ali Kitabi,

Please check our online example demonstrating server-side events of RadListBox here, note that AllowPostBackOnTransfer property for the first listbox should be set to "true".

Sincerely yours,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ali Kitabi
Top achievements
Rank 1
answered on 12 May 2010, 06:08 PM
Hi Yana,

I was trying this example only but it was not working for some unforeseen reason. However I do have found a solution for the problem, for those who might need it at some point.

Markup:

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
</telerik:RadScriptManager> 
<telerik:RadListBox ID="RadListBox1" runat="server" TransferToID="RadListBox2" AllowTransfer="True" AllowTransferDuplicates="True" AutoPostBack="true" > 
</telerik:RadListBox> 
<telerik:RadListBox ID="RadListBox2" runat="server" AutoPostBack="true" > 
</telerik:RadListBox> 

Code Behind:

        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
            RadListBox1.AutoPostBackOnTransfer = true;  
            RadListBox1.Transferring += new RadListBoxTransferringEventHandler(RadListBox1_Transferring);  
            RadListBox1.Transferred += new RadListBoxTransferredEventHandler(RadListBox1_Transferred);  
            RadListBox2.Inserted += new RadListBoxEventHandler(RadListBox2_Inserted);  
            RadListBox2.Transferring += new RadListBoxTransferringEventHandler(RadListBox2_Transferring);  
            RadListBox2.Transferred += new RadListBoxTransferredEventHandler(RadListBox2_Transferred);  
        }  
 
        void RadListBox2_Inserted(object sender, RadListBoxEventArgs e)  
        {  
              
        }  
 
        void RadListBox2_Transferred(object sender, RadListBoxTransferredEventArgs e)  
        {  
              
        }  
 
        void RadListBox2_Transferring(object sender, RadListBoxTransferringEventArgs e)  
        {  
              
        }  
 
        void RadListBox1_Transferred(object sender, RadListBoxTransferredEventArgs e)  
        {  
              
        }  
 
        void RadListBox1_Transferring(object sender, RadListBoxTransferringEventArgs e)  
        {  
              
        }  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
              
            if (!IsPostBack)  
            {  
                RadListBox1.Items.Add(new RadListBoxItem("1""1"));  
                RadListBox1.Items.Add(new RadListBoxItem("2""2"));  
                RadListBox1.Items.Add(new RadListBoxItem("3""3"));  
                RadListBox1.Items.Add(new RadListBoxItem("4""4"));  
            }  
        } 

I hope this helps someone.

Regards,

Ali
Shipcom Wireless. INC.

Asked by
Ali Kitabi
Top achievements
Rank 1
Answers by
Yana
Telerik team
Ali Kitabi
Top achievements
Rank 1
Share this question
or