diff --git a/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TableRenderer.h b/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TableRenderer.h index 373bd13cd..6579ce4ab 100644 --- a/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TableRenderer.h +++ b/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TableRenderer.h @@ -125,6 +125,9 @@ public: /// Adds a javascript callback to inform the WebServer that the client has pressed a mouse button /// Method signature is ( Ext.EventObject e) + static std::string createDnDGroupName(const Table* pTable); + /// Creates a DND name for the table + protected: static void renderProperties(const Table* pTable, const RenderContext& context, std::ostream& ostr); /// Renders Table properties diff --git a/WebWidgets/ExtJS/src/TableRenderer.cpp b/WebWidgets/ExtJS/src/TableRenderer.cpp index 0c13587c6..160f056f2 100644 --- a/WebWidgets/ExtJS/src/TableRenderer.cpp +++ b/WebWidgets/ExtJS/src/TableRenderer.cpp @@ -329,7 +329,7 @@ void TableRenderer::renderProperties(const Table* pTable, const RenderContext& c // sorting is allowed though, i.e row matching is active ostr << ",clicksToEdit:1,stripeRows:true,enableColumnHide:false,enableColumnMove:false,loadMask:true"; if (pTable->getDragAndDrop()) - ostr << ",enableDragDrop:true"; + ostr << ",enableDragDrop:true,ddGroup:'" << createDnDGroupName(pTable) << "'"; if (pTable->getSelectionModel() != Table::SM_CELL) { @@ -407,6 +407,13 @@ void TableRenderer::renderProperties(const Table* pTable, const RenderContext& c } +std::string TableRenderer::createDnDGroupName(const Table* pTable) +{ + poco_check_ptr (pTable); + return "ddgrid" + Poco::NumberFormatter::format(pTable->id()); +} + + void TableRenderer::renderColumns(const Table* pTable, const RenderContext& context, std::ostream& ostr) {