Hey all
On a webpage (see attachment*) with a RadGrid and a handfull of other Telerik controls we get some pretty odd behaviour which, however, can be reproduced time and again.
* uploading attachment doesnt seem to work, see here for the picture
When the page is loaded for the first time with the table hidden and after a partial (UpdatePanel) postback is initiated the control is shown with data but the height goes wrong and in IE we are able to see a JavaScript error (shown below).
The strange thing is that the main RadGrid div is properly set to the height of 450px but the rgDataDiv is somehow set to 300px (and no this is not done in code, css or javascript by any custom coding).
We use similar code on 3 more similar pages following the same scenario but these show no error and renders the grid with a total of 450px height and the rgDataDiv gets an 392px height which makes it fit perfectly.
When viewing the source of the rendered HTML all $create calls are related to Telerik controls (hence the post on this forum). And i see about a dozen of these:
Sofar i've also tried to add some custom Javascript code to the ClientEvents OnGridCreated but this script does not appear to get executed at all.
Now this isn't the prettiest code but when i execute it directly in the browser from a Firebug Console it works.
Any help is very much welcome :)
Kind regards,
Maarten Bos
Environment details;
Sharepoint 2010, ASP.Net 3.5, Telerik Ajax controls 2010.1.519.35
On a webpage (see attachment*) with a RadGrid and a handfull of other Telerik controls we get some pretty odd behaviour which, however, can be reproduced time and again.
* uploading attachment doesnt seem to work, see here for the picture
When the page is loaded for the first time with the table hidden and after a partial (UpdatePanel) postback is initiated the control is shown with data but the height goes wrong and in IE we are able to see a JavaScript error (shown below).
The strange thing is that the main RadGrid div is properly set to the height of 450px but the rgDataDiv is somehow set to 300px (and no this is not done in code, css or javascript by any custom coding).
We use similar code on 3 more similar pages following the same scenario but these show no error and renders the grid with a total of 450px height and the rgDataDiv gets an 392px height which makes it fit perfectly.
Error;
Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: type ScriptResource.axd?d=vUoTpDxDbR3vJWc5PDPuLYP64nfdrWbf-K52duDrCOVUeQueTMBQzu_1dzOmybqNDuWGBU4UdD1duqTGm1ioStXKKocFu18wOuSUO_RD3MM1&t=ffffffffec2d9970, line 2705 character 12
In function;
var $create = Sys.Component.create = function Sys$Component$create(type, properties, events, references, element) {
....
In file;
// Name: MicrosoftAjax.debug.js
// Assembly: System.Web.Extensions
// Version: 3.5.0.0
// FileVersion: 3.5.30729.4926
When viewing the source of the rendered HTML all $create calls are related to Telerik controls (hence the post on this forum). And i see about a dozen of these:
Sys.Application.add_init(
function
() {
$create(Telerik.Web.UI.RadDateInput,
{
"_focused"
:
false
,
"_originalValue"
:
"16-10-2009 0:00:00"
,
"_postBackEventReferenceScript"
:
"__doPostBack(\u0027ctl00$ctl18$g_729422f7_feb9_4651_91f8_ddbfeff99049$ctl00$historicalSelectionDateFromPicker\u0027,\u0027\u0027)"
,
"clientStateFieldID"
:
"ctl00_ctl18_g_729422f7_feb9_4651_91f8_ddbfeff99049_ctl00_historicalSelectionDateFromPicker_dateInput_ClientState"
,
*snip*
"incrementSettings"
:{InterceptArrowKeys:
true
,InterceptMouseWheel:
true
,Step:1},
"styles"
:{HoveredStyle: [
"width:100%;"
,
"riTextBox riHover"
],InvalidStyle: [
"width:100%;"
,
"riTextBox riError"
],DisabledStyle: [
"width:100%;"
,
"riTextBox riDisabled"
],FocusedStyle: [
"width:100%;"
,
"riTextBox riFocused"
],EmptyMessageStyle: [
"width:100%;"
,
"riTextBox riEmpty"
],ReadOnlyStyle: [
"width:100%;"
,
"riTextBox riRead"
],EnabledStyle: [
"width:100%;"
,
"riTextBox riEnabled"
]}},
{
"error"
:DateError,
"keyPress"
:ClearError},
null
,
$get(
"ctl00_ctl18_g_729422f7_feb9_4651_91f8_ddbfeff99049_ctl00_historicalSelectionDateFromPicker_dateInput"
));
});
Sofar i've also tried to add some custom Javascript code to the ClientEvents OnGridCreated but this script does not appear to get executed at all.
var
radGridByClass = $(
'.rgDataDiv'
);
if
(radGridByClass.length == 0)
return
;
var
radGridID = radGridByClass[0].id;
var
radGrid = document.getElementById(radGridID);
var
mainheight = $(
'.RadGrid'
).height();
var
gridHeaderheight = $(
'.rgHeaderDiv'
).height();
radGrid.style.height = mainheight - gridHeaderheight +
'px'
;
Now this isn't the prettiest code but when i execute it directly in the browser from a Firebug Console it works.
Any help is very much welcome :)
Kind regards,
Maarten Bos
Environment details;
Sharepoint 2010, ASP.Net 3.5, Telerik Ajax controls 2010.1.519.35