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

Postback on checkbox check changed

1 Answer 171 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Dirk Haucke
Top achievements
Rank 1
Dirk Haucke asked on 02 Sep 2009, 02:08 PM
Hello,

how can i get a postback when clicking the checkbox in a radlistbox? I know it's currently not built in but how can i add this?


1 Answer, 1 is accepted

Sort by
0
Accepted
Mr. Plinko
Top achievements
Rank 1
answered on 02 Sep 2009, 03:01 PM
I am sure there are many ways to do this. I like Javascript:

    <script 
        language="javascript"
        function OnClientItemChecked(sender, eventArgs) { 
 
            __doPostBack('', ''); 
        } 
    </script> 
 
    <telerik:RadListBox 
        ID="RadListBox1" 
        runat="server" 
        CheckBoxes="true" 
        OnClientItemChecked="OnClientItemChecked"
        <Items> 
            <telerik:RadListBoxItem 
                runat="server" 
                Text="RadListBoxItem1" /> 
            <telerik:RadListBoxItem 
                runat="server" 
                Text="RadListBoxItem2" /> 
            <telerik:RadListBoxItem 
                runat="server" 
                Text="RadListBoxItem3" /> 
            <telerik:RadListBoxItem 
                runat="server" 
                Text="RadListBoxItem4" /> 
            <telerik:RadListBoxItem 
                runat="server" 
                Text="RadListBoxItem5" /> 
        </Items> 
    </telerik:RadListBox> 


Look for __doPostBack with javascript
This link is pretty useful as well

Helpful?
Tags
ListBox
Asked by
Dirk Haucke
Top achievements
Rank 1
Answers by
Mr. Plinko
Top achievements
Rank 1
Share this question
or