Wilco you are the coolest. Ok maybe I am cooler but this tool is great.
Aaron
Hi,
thank your for your excellent controls and articles.
I have not made some pages with your webparts and they really work like a glance!!!
I only have one question:
Is it (and how) possible to create webpartzones programmatically?
I am using the following code which works fine displaying the webpartzones, but when dragging a panel onto it I am receiving the error "The target zone to which the webpart panel was dragged does not exist." - the exception of GetZoneByID ...
Thanks in advance for your help!
Greetings
Stefan
Table table = new Table();
table.ID = "tableDrop";
for (int r = 0; r < numRows; r++)
{
TableRow tr = new TableRow();
tr.ID = "tr" + r.ToString();
for (int c = 0; c < numCols; c++)
{
TableCell tc = new TableCell();
tc.ID = "tc_" + r.ToString() + "_" + c.ToString();
Wilco.Web.UI.WebControls.WebParts.WebPartZone wpz = new Wilco.Web.UI.WebControls.WebParts.WebPartZone();
wpz.CssClass = "webPartZone";
wpz.DragCssClass = "selectedWebPartZone";
wpz.Orientation = Wilco.Web.UI.WebControls.WebParts.Orientation.Vertical;
wpz.ID = "wpz_" + r.ToString() + "_" + c.ToString();
wpz.Enabled = true;
wpz.EmptyZoneText = "... drop here ...";
tc.Controls.Add(wpz);
tr.Cells.Add(tc);
}
table.Rows.Add(tr);
}
this.dropPlaceHolder.Controls.Add(table);
I was now trying to find a workaround for the problem above by defining 20 rows and columns declaratively and hiding them progammatically;
But there is an error (javascript error when loading the page) if you set a WebPartZone to visible=false:
"z ist null or not an object"
... sorry, posted to quickly:
... To overcome this error I changed the javascript in WebPartManager.js
1
2
3
4
5
6
7
8
9
|
function WebPartSetupZone(zone, normalClassName, selectedClassName)
{
z = document.getElementById(zone);
if (z != null)
{
z.normalClassName = normalClassName;
z.selectedClassName = selectedClassName;
}
}
|
Greetings Stefan
I recommend you use the WebParts that ship with ASP.NET 2.0. I wrote the WebParts stuff (or rather draggable panels) before ASP.NET 2.0 came along.
For drag/drop operations you should really use Atlas, which comes with a flexible DND API which works across different browsers.
Hello,
First, thanks for putting all this work into these controls and making it all public.
I am trying to use IDOverride to overcome a problem we have with huge ClientIDs, taking more than 40% of the response size.
I want to use IDOverride to generate short ClientIDs, problem is we have our controls in nested repeaters and UserControls and IDOverride control doesn't seem to be designed to work under these conditions.
First problem was, obviously, the static names which will be duplicated when using in repeating containers but I can easily overcome this by having a sequence of numbers appended to the name automatically per request.
Second problem is that when IDOverride control was used inside a repeater it was generated dynamically and so the OnInit called after the Page’s OnLoad and therefore IDOverride’s PreLoad is never called so changedPostDataConsumers is never initialized. I solved this by always creating changedPostDataConsumers in the IDOverride’s constructor. Any drawbacks? Why is it created in ProcessPostData(...) anyway? Isn’t it always needed?
The last problem that I was not able to find solution to yet is that if I use the IDOverride to set the ID of UserControls that have controls that trigger postbacks, the page will complain about Event Validation. I assume this is because Asp.net doesn’t find the ClientID pattern it was expecting for event validation. I tried to set these dynamically with RegisterForEventValidation but it is not working, for some reason. I don’t want to disable this entirely on the page’s levels. Any idea how to solve this?
Any more pitfalls I should expect?
Thanks.
I just downloaded and built this so I could use the "RowSelectorField". I built the dll and added the release version to my projects toolbox but the RowSelectorField doesn't show up. Help!
Thanks
Please ignore my last message. New question: is there a way to databind a column that is single select?
Hi Guys,
I'm having problem with "RowSelectorField". I try to use it on a aspx page with a master page using Ajax.
1
2
|
<wilco:RowSelectorField HeaderText="All" SelectionMode="Multiple"
AutoPostBack="false" ShowHeader="false" />
|
The problem I encouter is that Atlas is active when I try to click on a checkbox I have a Javascript error telling me that object is not found. But if I disable Ajax Everything's working fine (but of course Ajax is not working anymore)
1
2
3
4
5
6
7
|
//This will work
System.Web.UI.ScriptManager sm = (System.Web.UI.ScriptManager)this.Master.FindControl("scriptMgr");
sm.EnablePartialRendering = false;
//This won't work
System.Web.UI.ScriptManager sm = (System.Web.UI.ScriptManager)this.Master.FindControl("scriptMgr");
sm.EnablePartialRendering = true;
|
Any ideas ?
Thank you very much
The RowSelectorField seems to do exatcly what I would want it to do but I can't get it to work. I added a reference to the dll in my project and I see some controls except for the RowSelectorField. Does anyone have any suggestion?
Thanks
Chris.
Chris: That's probably an intellisense issue. Try ignoring intellisense and see if you can get it working that way.
Hey Wilco
I get an "Element 'RowSelectorField' is not a known Element" message when I try to do that?
Chris.
Yeah, but that's really just a designer error. Try ignoring it and navigate to the page anyway using a browser.
It works fine!!
Thanks for persisting with me Wilco.
Chris.
Wilco,
Thanks for the tools. I have a question about the RowSelectorField....it appears to use postbacks to do the selectAll etc, is it possible to make this work entirely on the client side? If so, please point me in the right direction.
Thanks
Paul
overridden methods from System.Web.UI.Design.WebControls in the WebPartZoneDesigner.cs file are now obsolete and Visual Studio warns you about these obsolete methods.
CreateTemplateEditingFrame
GetCachedTemplateEditingVerbs
GetTemplateContent
SetTemplateContent
Microsoft suggests exposing template data via the TemplateGroups property and calling the SetViewFlags.
http://msdn2.microsoft.com/en-us/library/system.web.ui.design.webcontrols.datalistdesigner.createtemplateeditingframe.aspx
You can use the [ObsoleteAttribute] tag to pacify the warnings or update the calls.
Hi
I am Sreedhar Ambati.
The controls are simply superb.
I want to use these controls. And started using them.
"Microsoft JScript runtime error: '__pendingCallbacks[...].async' is null or not an object"
This is the javascript error I am getting when I am using SmartTextBox.
How to get rid off this error?
Please give your help.
Regards,
Sreedhar Ambati
I cant create any control using your reference to please tell me how its?