View Full Version : [CLOSED] Icon in Nested Lists
ADV
Oct 03, 2016, 11:21 AM
Hi,
it's possible to add one icon to the Nested lists row (before text)?
And more generally, it's possible to use a custom template to have custom rows?
Tks
fabricio.murta
Oct 03, 2016, 6:42 PM
Hello @ADV!
As for the icons, I'm afraid the NestedList ignores the icon setting in the treestore's nodes, if any, unfortunately.
As for the item template, you can set it up through the NestedList's ListConfig in a similar way to this example:
User Inteface > Lists > Sortable (http://mobile.ext.net/#menu/lists).
Hope this helps!
Hi,
can you provide for example how i can get this (multilevel Nested lists)
http://mobile.ext.net/#demo/nestedlistbasic
without using TreeStore and instead using <ListConfig><ext:List...?
thank you
fabricio.murta
Oct 03, 2016, 7:51 PM
Hello!
The nestedList requires a tree store as it has multiple level. If you need a single-level list, use the plain List component, as the example above.
As for customizing the display of the NestedList, something like that should get you started:
<%@ Page Language="C#" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager runat="server" />
<ext:NestedList runat="server" ID="nl1" Title="Restaurant Menu" FullScreen="true">
<ListConfig>
<ext:List runat="server">
<ItemTpl runat="server">
<Html>
<div style="display:inline-block; width: 10%;">
[{checked}]
</div>
{text}
</Html>
</ItemTpl>
</ext:List>
</ListConfig>
<Store>
<ext:TreeStore runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="text" />
</Fields>
</ext:Model>
</Model>
<Root>
<ext:Node Text="Menu">
<Children>
<ext:Node Text="Drinks" Icon="Anchor" Checked="true">
<Children>
<ext:Node Text="Water" />
<ext:Node Text="Beer" />
<ext:Node Text="Whiskey" />
<ext:Node Text="Wine" />
</Children>
</ext:Node>
<ext:Node Text="Dishes" Icon="Application" Checked="false">
<Children>
<ext:Node Text="Rice" />
<ext:Node Text="Beans" />
<ext:Node Text="Meat" />
<ext:Node Text="Salad" />
</Children>
</ext:Node>
</Children>
</ext:Node>
</Root>
</ext:TreeStore>
</Store>
</ext:NestedList>
</div>
</form>
</body>
</html>
Hope this helps!
fabricio.murta
Dec 02, 2016, 2:02 PM
Hello @ADV!
It's been some time since we last replied you here and still no feedback from you. Do you still need help with this issue? We're looking forward for your feedback.
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.