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

Empty checked items in RadListBox after saving checked itmes

1 Answer 111 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Avihai
Top achievements
Rank 1
Avihai asked on 22 Jul 2014, 07:52 PM
Hi,

I'm having a problem with the RadListBox, after I'm looping through the RadListBox and see which item has been checked, I'm clicking on save button
the list coming up again but I have empty checkboxes that been checked!!
what can cause that??

my code in asp.net
<table>
<tr>
<td style="text-align: left; vertical-align: top;" class="GeneralFontShapeSmall">
Locations:<span class="validationClass">*</span>
<div>
Total Selected:
<asp:Label ID="lblTotal" runat="server"></asp:Label>
</div>
</td>
<td style="text-align: left">
<telerik:RadListBox ID="rlbLocations" CheckBoxes="true" Width="260px" OnClientItemChecked="ShowTotalCheckedLocations" EnableViewState="false"
OnClientCheckAllChecked="ShowTotalCheckedLocations" ShowCheckAll="true" Height="163px"
runat="server">
</telerik:RadListBox>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<telerik:RadButton ID="btnShowSelectedOnly" Text="Show Checked Only" ToggleType="CheckBox" Width="135px" AutoPostBack="false" OnClientClicked="toggleLocationShow" runat="server">
<ToggleStates>
<telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleCheckboxChecked"></telerik:RadButtonToggleState>
<telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleCheckbox"></telerik:RadButtonToggleState>
</ToggleStates>
</telerik:RadButton>
</td>
</tr>
</table>


please see the attached file.






1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Jul 2014, 05:19 AM
Hi Avihai,

The provided information is not enough to replicate the issue . Please have a look into the sample code snippet which works fine at my end. Please Provide your full code further help.

ASPX:
<telerik:RadListBox ID="rlbLocations" CheckBoxes="true" Width="260px" EnableViewState="false"
    ShowCheckAll="true" Height="163px" runat="server">
    <Items>
        <telerik:RadListBoxItem Text="Item1" />
        <telerik:RadListBoxItem Text="Item2" />
        <telerik:RadListBoxItem Text="Item3" />
    </Items>
</telerik:RadListBox>
<telerik:RadButton ID="rbtnSave" runat="server" Text="Save">
</telerik:RadButton>

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