This is a migrated thread and some comments may be shown as answers.

serverside Button Events from within the ComboBox

1 Answer 68 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 08 Feb 2012, 11:20 PM
How to catch an asp:Button Click event from the <FooterTemplate> of a RadComboBox ,on the server side,
RabComboBox has Checkboxes in it... and on click of that Asp:Button(which is inside FooterTemplate) i need to catch all the chcked Items from the ComboBox
Thanks

Environment:- ASP.Net Ajax 3.5, C#

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Feb 2012, 05:30 AM
Hello,

Try the following code snippet.
C#:
protected void Button1_Click(object sender, EventArgs e)
   {
       string checkedText = " ";
       var collection = RadComboBox1.CheckedItems;
       foreach (var item in collection)
        {
            checkedText += item.Text + "<br />";
        }
        Response.Write(checkedText);
   }

Thanks,
Princy.
Tags
ComboBox
Asked by
Robert
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or