DataView with tpl, get store value

  1. #1

    DataView with tpl, get store value

    Hi ,

    I am using the dataview like the example
    <ext:DataView ID="DataView1" runat="server"
    SingleSelect="true"
    Cls="img-chooser-view"
    OverItemCls="x-view-over" Selectable="true"
    ItemSelector="div.thumb-wrap" Frame="false">

    <Store>
    <ext:Store ID="storeMachines" runat="server">
    <Model>
    <ext:Model ID="Model4" runat="server">
    <Fields>
    <ext:ModelField Name="Id" Type="Int" />
    <ext:ModelField Name="MachineName" />
    <ext:ModelField Name="EnvironmentId" Type="Int" />


    </Fields>
    </ext:Model>
    </Model>
    </ext:Store>
    </Store>
    <Tpl runat="server">
    <Html>
    <tpl for=".">
    <div class="thumb-wrap">
    <div class="thumb">
    <tpl if="!Ext.isIE6">

    <img src="Images/sdfeimg.jpg" />
    </tpl>
    <tpl if="Ext.isIE6">
    <div style="width:74px;height:74px;filter:progid:DXImag eTransform.Microsoft.AlphaImageLoader(src="{'Image s/azureimg.jpg'}")"></div>
    </tpl>
    </div>
    <span>{MachineName}</span>
    <input type="text" value="{MachineName}" name="vmname"></input>
    </div>
    </tpl>
    </Html>
    </Tpl>
    <Listeners>
    <SelectionChange Handler="if(selections[0]){App.ImgDetailPanel.show(); App.ImgDetailPanel.loadRecord(selections[0])}" />
    <ItemDblClick Handler="App.ImgChooserDlg.down('button[text=OK]').fireEvent('click');" />
    </Listeners>
    <DirectEvents>
    <SelectionChange OnEvent="GetVMDetails" Timeout="100000">
    <ExtraParams>


    </ExtraParams>
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="ImgDetailPanel"></EventMask>
    </SelectionChange>
    </DirectEvents>
    </ext:DataView>

    What i need to do is get the selected item data in the direct event handler
    unfortunately ,i have tried record.data.MachineName and i am not getting data .

    help is appreciated

    Thanks
  2. #2
    Please see the following sample (Submit selected button)
    https://examples2.ext.net/#/DataView/Basic/Overview/
  3. #3
    Quote Originally Posted by Vladimir View Post
    Please see the following sample (Submit selected button)
    https://examples2.ext.net/#/DataView/Basic/Overview/
    SOlved .Thanks Vladamir

Similar Threads

  1. [OPEN] [#97] DataView Selection Plugin breaks on Store.reload()
    By paulc in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 27, 2012, 8:42 AM
  2. [CLOSED] DataView Template unable to read the store Record Field
    By farisqadadeh in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 20, 2010, 3:23 PM
  3. Dataview/Store Size
    By walle in forum 1.x Help
    Replies: 4
    Last Post: Oct 27, 2010, 9:45 PM
  4. [CLOSED] [1.0] Dataview should not require a store
    By jchau in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 16, 2010, 7:41 PM
  5. Replies: 2
    Last Post: Aug 05, 2010, 3:50 PM

Tags for this Thread

Posting Permissions