Mar 25, 2014, 11:57 AM
[CLOSED] Enable/Disable drag and drop of grid panel.
I Followed suggestion provided in following link,
http://forums.ext.net/showthread.php...other&p=135711
However I got following error.
Error: Unable to get property 'dropZone' of undefined or null reference
http://forums.ext.net/showthread.php...other&p=135711
However I got following error.
Error: Unable to get property 'dropZone' of undefined or null reference
<ext:Store ID="StoreDBScript" runat="server" PageSize="50">
<Model>
<ext:Model ID="StoreModelDBScript" runat="server" IDProperty="DBScriptId" ClientIdProperty="DBScriptId">
<Fields>
<ext:ModelField Name="DBScriptId" />
<ext:ModelField Name="DBBuildId" />
<ext:ModelField Name="Name" />
<ext:ModelField Name="DBScriptType" Type="Int" UseNull="true"/>
<ext:ModelField Name="DBChangeType" Type="Int" UseNull="true"/>
<ext:ModelField Name="Description" />
<ext:ModelField Name="Reference" />
<ext:ModelField Name="Sequence" Type="Int"/>
<ext:ModelField Name="Script" />
<ext:ModelField Name="ChangedBy" />
<ext:ModelField Name="ChangedOn"/>
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:Viewport ID="ViewportDBScript" runat="server" Layout="VBoxLayout">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:GridPanel
ID="DBScriptGrid"
runat="server"
Header="False"
ColumnLines="True"
Region="Center"
EmptyText="No Records Found"
SortableColumns="true"
StoreID="StoreDBScript"
Flex="3">
<ColumnModel ID="DBScriptColumnModel" runat="server" Enabled="false">
<Columns>
<ext:Column ID="ColumnScriptName" runat="server" Flex="1" Text="Name" DataIndex="Name">
<Editor>
<ext:TextField ID="TextScriptName" runat="server">
</ext:TextField>
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModelDBScript" runat="server">
</ext:RowSelectionModel>
</SelectionModel>
<Plugins>
<ext:CellEditing ID="CellEditing1" runat="server" ClicksToEdit="1">
</ext:CellEditing>
</Plugins>
<View>
<ext:GridView ID="GridViewDBScript" runat="server">
<Plugins>
<ext:GridDragDrop PluginId="DragDropDBScript" runat="server" DragText="Drag and drop"/>
</Plugins>
</ext:GridView>
</View>
<TopBar>
<ext:Toolbar ID="ToolbarDBScript" runat="server" Height="30" Flex="1">
<Items>
<ext:Label runat="server" ID="titleDBScripts" Text="DB Scripts" Icon="ApplicationViewList" Cls="lblcss" Flex="1"/>
<ext:Label runat="server" ID="Label1" Cls="lblcss" flex="1"/>
<ext:Button ID="btnEdit" runat="server" Text="Edit" Disabled="true" ToolTip="Edit Data">
<Listeners>
<Enable Handler="App.DBScriptGrid.getView().getPlugin('DragDropDBScript').dropZone.lock();" />
<Disable Handler="App.DBScriptGrid.getView().getPlugin('DragDropDBScript').dropZone.unlock();" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
</ext:GridPanel>
</Items>
</ext:Viewport>
Please reply. This is bit urgent.
Last edited by geoffrey.mcgill; Mar 26, 2014 at 4:26 PM.
Reason: [CLOSED]