Combobox Template item lost after client operation

1 posts, 0 answers
  1. Yano
    Yano avatar
    9 posts
    Member since:
    Sep 2009

    Posted 08 Jun 2018 Link to this post

    Hello, i have RadCombobox with ItemTemplate (Icon  + Text):

    <telerik:RadComboBox ID="rcCombo" runat="server" Width="500" >
        <ItemTemplate>
            <table>
                <tr>
                    <td>
                        <span class='<%# DataBinder.Eval(Container.DataItem, "ICON") %>'>
                        </span>
                    </td>
                    <td>
                        <%# DataBinder.Eval(Container.DataItem, "TEXT") %>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </telerik:RadComboBox>

     

    and i made reorderig at first posision in Client via javascript

    var combo = $find("<%= rcCombo.ClientID %>");
    var items = combo.get_items();
    combo.trackChanges();
    var comboItem = combo.findItemByValue('value');
    items.insert(0, comboItem);
    comboItem.highlight();
    combo.updateClientState();
    combo.commitChanges();

     

    and after repositioning of comboitem ItemTemplate is not showing - no ICON only simple Text.

    Do i need to create ClientItemTemplate for repositioned items or any recomendation?

    thanks

Back to Top