Change what is rendered when dragging a webpart
-
Hi all I have a web page with a number of webparts which I have created (as in inherited from Webpart not just web controls in a zone) in a zone I have created along with a created chrome. They all work fine! The problem is that they contain a lot of information and I have noticed that when you try to drag a webpart you need to wait a little while before you can actually move it about - I'm assuming this is because it is rendering the webpart again in it's semi visible state. I was wondering if it is possible to only have the title bar with the title of the webpart with any verb buttons rendered in the semi visible control that is attached to the cursor when moving a webpart. Is there a function in the webpart itself that I need to override? Or perhaps something to put into the RenderWebPart method of the chrome so that it wont call renderPartContents for the drag rendering? Many thanks in advance!
-
Hi all I have a web page with a number of webparts which I have created (as in inherited from Webpart not just web controls in a zone) in a zone I have created along with a created chrome. They all work fine! The problem is that they contain a lot of information and I have noticed that when you try to drag a webpart you need to wait a little while before you can actually move it about - I'm assuming this is because it is rendering the webpart again in it's semi visible state. I was wondering if it is possible to only have the title bar with the title of the webpart with any verb buttons rendered in the semi visible control that is attached to the cursor when moving a webpart. Is there a function in the webpart itself that I need to override? Or perhaps something to put into the RenderWebPart method of the chrome so that it wont call renderPartContents for the drag rendering? Many thanks in advance!
After some further research I have come to conclusion that it is not possible - there is inbuilt javascript that simply clones the webpart into a floating div that appears when you go to drag a webpart. Maybe in future versions (I'm working in 2.0) this can change... Initially I wanted to have the page in catalog mode all the time but to get a solution to the problem I have moved away from this. I have added a boolean property to my webparts that when set to false will not add any controls to the webpart. Therefore when my button is pressed to put the page in catalog mode, this flag is set to false meaning just the title of the webparts are displayed enabling quick cloning into the floating div. Thanks to anyone that did try and find a solution.