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.
waddie1
Posts
-
Change what is rendered when dragging a webpart -
Change what is rendered when dragging a webpartHi 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!
-
Event firing [modified]Hi Michael, thanks for the reply. The code you provided is similar to what I currently have but as yet doesn't work, the only difference being that I am using hidden fields to store the position of the scroll rather than a cookie. When I put an alert in with the function after setting the scrolltop, the page and all the information is there and visible when the alert pops up but the DIV doesn't have any scrollbars yet (it just carries on through the bottom of the page). Once ok is pressed the DIV appears to resize (no resize event fires...) and then the scrollbars appear. Setting the scrolltop property when no scrollbar is present does not change the value, it stays at 0. That is what I want to do when the DIV has finished loading and the scrollbar is present, set the position of the scrollbar. Can the resizing be due to the DIV having it's width and height being set as a percentage rather than an absolute? -- modified at 4:27 Friday 30th November, 2007
-
Event firing [modified]Hey guys I've tried most events that I have found on the net but none seem to fire when I want, it is almost as if there is no event being fired. I have a scrollable panel in my asp.net page and want to maintain the scroll position. First I tried to do it through .Net using the MaintainScrollPoisition property but that didn't work. I then turned to javascript to try and get the job done, I have two methods, one that saves the position and one the sets the position of the scrollbar. The save method works fine on the onscroll event but I can't seem to find an event that fires after the panel (which renders as a div in html) has completly finished loading. I have tried using the window.onload to run it but the div doesn't actually have a scrollbar when this fires. I then tried running it when the readyState is set to completed but that also runs before the panel has finished. Any help on what other events I can try will be much appreciated. Many thanks in advance. PS the panel is within a page in a masterpage in .Net but I don't think that should affect anything when doing it via javascript. -- modified at 4:17 Tuesday 27th November, 2007
-
Check all treeview nodesHey guys I have a treeview with checkboxes being shown. I also have two buttons, one to check all the checkboxes and one to uncheck them all. I can do this in the code behind but was hoping someone can point me in the right direction for a javascript method so to avoid a postback. Thanks in advance. A.
-
Creating deploymentHey guys I am trying to create an install file for my solution. My solution has five projects, four of which are business layers and data access layers. The UI project has references to the debug dll's of the other projects and all works fine in debug mode. However when I build the setup project and run it on another computer it is still trying to reference the debug dll's rather than those installed. What am I doing wrong? I thought the setup project automatically changed these references!? I am using the setup wizard project to create the relevant files. Thanks in advance
-
Row select on DataGridViewCheers that does the trick
-
Row select on DataGridViewI was using the selectionChanged event of the datagrid, is there anyway of knowing which row the selection was made on? ie if row is header row type then do nothing?
-
Row select on DataGridViewHey guys I have a datagridview populated with entries from a database. I have set the selection mode of the grid to fullrowselect so that a click on any cell will cause selection of that row. In this selection event I open a new form showing the data contained in that row. This works fine, however when you click on a column header it still tries to select that row. Is there any way of stopping this? Thanks in advance
-
Remove row from tablelayoutpanelCheers that worked, still a bit of a gap but between rows that are still remaining but it's better than having unused controls. :)
-
Remove row from tablelayoutpanelHey all I have a TableLayoutPanel on a form, this form is inherited a number of times by others. This works fine but some of these forms do not need all the rows that are on the default table. I can't see any way of removing a particular row from the layout (ie row 3) on the new forms load. Can this actually be done at run time? It just seems wrong if you can't... Thanks in advance.
-
Updating ADCheers, I thought it would be something like that. I'll just use the work-around of entering a single space in when the value I want to send in is empty, then when retrieving the data I'll check for that and return an empty string to the UI.
-
Updating ADHey all I have a problem updating AD when the value I want to pass in is empty. When I do this I get a login credentials pop up but when the value is not empty it updates fine. An example piece of code:
Dim user as DirectoryEntry Dim name as string = "" user = getUserFromAD(AccountID) 'This returns a directory entry from AD user.Properties("givenName").Value = name
If I actually go to AD and modify it then empty strings are allowed. Any help will be much appreciated, thanks in advance. -
Setting a calendar's selected date:-D Cheers mate, that worked, didn't realise that it would take a string!
-
Setting a calendar's selected dateDate.Now doesn't work but Date.Today does, the only difference is that date.today doesn't have hours, minutes and seconds. Now my date object does so I'm assuming that's the problem! Any idea's on how to force my date object into that format?
-
Setting a calendar's selected dateThis seems like something that should be easy but it just is not working. What I want to do is set the selected date of a calendar control programatically on the page load. I tried this and it did'nt work:
myCalendar.SelectedDate = myDate myCalendar.VisibleDate = myDate
The visible date is changed and the correct month is shown but the selected date is not highlighted like it is after you click on a date. Any suggestions on what the problem is? myDate is simply a date object. Thanks in advance. -
programmatically create insert item templateCheers mate, my google search techniques must be poor as I didn't come accross that :sigh::doh:
-
programmatically create insert item templateHey all I have a formView control on my page and I want to add a programmatically created insert item template to it. Is there any way to create the template with controls already on it and then add it to the formView? Thanks in advance
-
Gridview header visibleHey all I have a gridview on my page which the you can filter. This all works fine, however when your filter returns no results the whole table disappears. Is there anyway to keep the header row visible instead of the blank screen? Thanks in advance
-
DropDownList problemCheers for the reply I have also tried with the same code in a new project now and it works. Suppose this project is just being funny with me :mad: thanks again