Problems with DataView and ItemSelector for nested tpl structures

  1. #1

    Problems with DataView and ItemSelector for nested tpl structures

    Hi
    I can get a DataView and itemselector working correctly for a parent tpl div but not for a child one. Is this possible? For example this this fails:

    <ext:DataView ID="DataViewNodesDS" runat="server" ItemSelector="div.item-wrap" OverItemCls="x-item-over" TrackOver="True" MultiSelect="true" AutoHeight="true" EmptyText="No items to display">
    	<Store>
    		<ext:Store ID="StoreNodesDS2" runat="server">
    			<Model>
    				<ext:Model ID="Model5" runat="server">
    					<Fields>
    						<ext:ModelField Name="Nodes" IsComplex="true" />
    					</Fields>
    				</ext:Model>
    			</Model>
    		</ext:Store>
    	</Store>
    	<Tpl ID="Tpl2" runat="server">
    		<Html>
    			<tpl for=".">
    						<tpl for="Nodes">
    							<div class="item-wrap">{Node}</div>
    						</tpl>
    						<div style="clear:left"></div>
    			</tpl>
    		</Html>
    	</Tpl>
    	<Plugins>
    		<ext:DataViewDragSelector ID="DataViewDragSelector2" runat="server" />
    	</Plugins>
    </ext:DataView>
    I'm trying to get a DataView as follows, where each of the numbers are selectable items:
    Click image for larger version. 

Name:	dataView.png 
Views:	212 
Size:	4.3 KB 
ID:	4438

    My data structure is as follows but could be changed if it would make it possible (I have tried a simple array of arrays but couldn't get that to work either):
    Click image for larger version. 

Name:	dataStructure.png 
Views:	332 
Size:	38.6 KB 
ID:	4439

    Thanks for any help you can give.
  2. #2
    ItemSelector must correspond real record
    Please see the following sample
    https://examples2.ext.net/#/DataView/Advanced/Grouping/
  3. #3
    Hi
    I'm sorry I don't understand what you mean by a "real record". I thought I had structured my data in a similar format to the provided examples? Do you mean ItemSelector can only be applied to the parent node?

    I have been using the Advanced/Grouping example as well as the Basic/Oveview example to help write my code. The grouping example is most relevant to my data (I can add a group title and I can get the ItemSelector to work correctly with the div.group-header parent <tpl>) but I need multiple selection on the child nodes. So in the Advanced/Grouping example I would need MultiSelect="true" and ItemSelector="div.item-wrap" so I could select, for example, Customers, Inventory and Suppliers.

    Is there any way to achieve this? Should I organise the structure of my data differently (although I would need to retain the logical distinction of having groups of nodes) Or is there another feature of Ext.Net that I could use to solve this?

    Thanks for your help.

Similar Threads

  1. [CLOSED] DataView to DataView Drag and Drop
    By paulc in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 10, 2012, 8:19 PM
  2. [CLOSED] Nested data in nested grids
    By FAS in forum 1.x Legacy Premium Help
    Replies: 16
    Last Post: Apr 19, 2012, 7:51 PM
  3. Replies: 18
    Last Post: Jul 20, 2011, 8:59 PM
  4. Problems displaying DataView
    By aleonardo83 in forum 1.x Help
    Replies: 4
    Last Post: Feb 10, 2011, 2:15 PM
  5. How to load itemselector
    By amanind in forum 1.x Help
    Replies: 0
    Last Post: Jul 21, 2010, 11:18 AM

Tags for this Thread

Posting Permissions