User Control Designer Size
Hi,
I searched for a solution to change the DesignerBox for a control, but nothing works.
"dialogBase.resizeToContent();" doesn't do anything no matter where i put that..
Even if i call it on the ascx page at the bottom.
So how do i change the size of the Box like it does when editing an image or a text?
Greetings
Niko
Hi Nikodem,
If you use Telerik.Sitefinity.Web.UI.AjaxDialogBase as a basis you should be able to call
this.resizeToContent();
or dialogBase.resizeToContent(); if you use Telerik.Sitefinity.Web.UI.ControlDesign.ControlDesignerBase as a base.
Kind regards,
Ivan Dimitrov
the Telerik team
I have a similar problem on my CustomSettingsDesignerView dialog based on the products module - it works perfectly except for the same issue of resizing i have tried both dialogBase.resizeToContent(); as shown below and this.resizeToContent(); - nither works - do i have it in the correct place ?
refreshUI:
function
()
this
._refreshing =
true
;
var
control =
this
.get_controlData();
var
field = $find(
this
._numberOfTestimonialsDisplayedControlId);
field.set_value(control.NumberOfTestimonialsDisplayed);
var
zonefield = $find(
this
._zonesSelectedControlId);
var
taxonArray = control.SelectedZones.split(
","
);
var
selectedTaxaCount = taxonArray.length;
zonefield.loadTaxa(taxonArray);
var
_selectedTaxaIndex = taxonArray.length - 1;
while
(selectedTaxaCount--)
var
Taxon = zonefield._getTaxon(taxonArray[_selectedTaxaIndex])
zonefield.addTaxon(Taxon);
_selectedTaxaIndex--;
this
._refreshing =
false
;
dialogBase.resizeToContent();
,
Hi Philip,
If your client component is based on Telerik.Sitefinity.Web.UI.ControlDesign.ControlDesignerBase, inside PropertyGrid and its pageLoaded we call dialogBase.resizeToContent(); which overrides the settings that resize the window.You need to create or disable /override the pageLoaded. The PropertyGrid is not accessed directly. The property grid is wrapped inside ControlDesignerBase and send to the client component. There does not seem to be a straight way to access the load of the PropertyGrid. You will need a class that inherits from PropertyGrid, then wrap your custom PropertyGrid in a custom ControlDesignerBase class and finally use the custom ControlDesigner base component on the client. This seems to be an usability issue and the solution looks quite complex for this change
Best wishes,
Ivan Dimitrov
the Telerik team