Empty checked items in RadListBox after saving checked itmes

2 posts, 0 answers
  1. Avihai
    Avihai avatar
    21 posts
    Member since:
    Aug 2013

    Posted 22 Jul 2014 Link to this post

    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.






  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Jul 2014 in reply to Avihai Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top