I am a software engineer supporting a legacy product which uses Telerik 2018.2.516.45 . We are using Telerik for ASP.NET Core .
We have a Telerik Radwindow embedded into an .aspx page which we intend to use as a modal dialog box thus:
< telerik : RadWindow runat="server" ID="rwE1Products" DockMode="false" VisibleOnPageLoad="false" AutoSize="true" OnClientBeforeShow="onPopupShow" OnClientClose="onPopupHide" ClientIDMode="Static">
<ContentTemplate>
<div class="info_popup">
<Repeater runat="server" ItemType="System.Tuple`2[System.String,System.String]" ID="rptData">
<HeaderTemplate>
<ul>
</HeaderTemplate>
<ItemTemplate>
<!-- some content -->
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
<EmptyTemplate>
</EmptyTemplate>
</Repeater>
</div>
</ContentTemplate>
</telerik:RadWindow>
And on this page, we call it thus:
function showE1Product() {
var oWnd = $find('rwE1Products');
oWnd.show();
$('#RadWindowWrapper_rwE1Products').css({ 'z-index': '10007' });
$('#rwE1Products_C').css({ 'overflow': 'hidden' });
}
Which is called with a button click.
When we click the button, the modal appears blank and the screen is moreover locked. Looking in our chrome developer tools, we see the error:
Uncaught TypeError: Cannot read property 'style' of undefined
at c.RadWindow.setOverflowVisible (ScriptResource.axd?d=wl5RKBCXTWDacHhxsSq8Q5gVEhb1VTyApq4eHCb1LIATB-dfkUbfjZqwHAMAcwKstvsADD5CfrfCrz5tBRnf1RC2Ji982n8TmXGh3FF4LqbYvZEtKgOV2F48baIXy3BkdwUasQ2&t=2afde251:851)
at c.RadWindow.autoSize (ScriptResource.axd?d=wl5RKBCXTWDacHhxsSq8Q5gVEhb1VTyApq4eHCb1LIATB-dfkUbfjZqwHAMAcwKstvsADD5CfrfCrz5tBRnf1RC2Ji982n8TmXGh3FF4LqbYvZEtKgOV2F48baIXy3BkdwUasQ2&t=2afde251:641)
at c.RadWindow._afterShow (ScriptResource.axd?d=wl5RKBCXTWDacHhxsSq8Q5gVEhb1VTyApq4eHCb1LIATB-dfkUbfjZqwHAMAcwKstvsADD5CfrfCrz5tBRnf1RC2Ji982n8TmXGh3FF4LqbYvZEtKgOV2F48baIXy3BkdwUasQ2&t=2afde251:488)
at c.RadWindow.show (ScriptResource.axd?d=wl5RKBCXTWDacHhxsSq8Q5gVEhb1VTyApq4eHCb1LIATB-dfkUbfjZqwHAMAcwKstvsADD5CfrfCrz5tBRnf1RC2Ji982n8TmXGh3FF4LqbYvZEtKgOV2F48baIXy3BkdwUasQ2&t=2afde251:439)
at showE1Product ()
at HTMLAnchorElement.onclick ()
Drilling down into the radwindow card, within the radwindow javascript, i see the problem here:
if(this._dockMode){this.get_contentElement().style
get_contentElement() is returning null. And the reason it is returning null is because this.pending_ui is also null.
I have been googling, asking colleagues, and scanning these forums without finding any idea as to how to solve the issue. I removed the "ClientIDMode=Static" field without result.
I see that this call is set only when dockmode is nonzero. Is there a way to null that out and bypass the issue? If not, why would pending_ui be null?
This is well down into the guts of the radwindow implementation at this point, so I thought it worthwhile to ask for advice at this juncture.
One final clue is that this was apparently working up until about April of this year, but we're seeing the same problem on IE 11 , which hasn't been updated in forever, so I don't think the issue is due to a browser change.
UPDATE:
The javascript methods on the clientshow and clienthide hooks are
function onPopupShow(sender, args) {
$('#updateProgressDiv').show();
}
function onPopupHide(sender, args) {
$('#updateProgressDiv').hide();
}
which is apparently another div on the page.
Removing these hooks allows the dialog to display without locking the screen. However, we still do not see the content.
UPDATE 2: Modifying the "open window" javascript to use a manager thus:
function showE1Product() {
var manager = GetRadWindowManager();
manager.open(null, 'rwE1Products');
/* var oWnd = $find('rwE1Products');
oWnd.show(); */
$('#RadWindowWrapper_rwE1Products').css({ 'z-index': '10007' });
$('#rwE1Products_C').css({ 'overflow': 'hidden' });
}
Gets rid of the console errors, but the content is still not populated.
Still, we seem to have answered at least one of the problems: We were getting the errors because we weren't using a radwindowmanager when one was available.
UPDATE #3 :
Solved the problem. Removed the clientidmode=static and changed the open method to
function showE1Product() {
var oWnd = $find('<%= rwE1Products.ClientID %>');
oWnd.show();
$('#RadWindowWrapper_<%= rwE1Products.ClientID%>').css({ 'z-index': '10007' });
$('#<%= rwE1Products.ClientID%>_C').css({ 'overflow': 'hidden' });
}
Apparently radwindow doesn't like static ids. If anyone would like to shed some light on why this would be and how we can use them PROPERLY, I'd love to read it. But the issue itself is solved.
UPDATE #4: Now that I know what to look for, I find out that you just can't use static ids with a telerik control.
https://www.telerik.com/forums/changing-window-clientidmode-to-static-causes-javascript-error
So the problem was the static id, and there is no way to use one; we must use default client id mode. This question is answered.
Respectfully,
Brian P.
Hi am trying to add the kendo textbox in my custom Tag helper. I am not able to do it.
public string Title { get; set; }
When I export the grouped grid to by columns in pdf, in pdf the groupings that have a lot of data split and generate several equal smaller groupings, when the right thing would be that the groupings remain independent of the amount of data.
I'm looking for a similar solution to the following for the grid filtering -
http://www.crowbarsolutions.com/ignoring-time-when-filtering-dates-in-telerik-kendo-grids/
Currently the date filtering isn't working as it is obviously taking in to account the time element - which we don't want. Previously we followed the above article which worked great for our old mvc framework site, however now we are migrating to core it isn't possible to use the methods / overrides mentioned in the article.
Thanks
Is it possible to change the k-i-filter on the grid column to k-i-filter-clear when the filter is on active state?
<div class="k-rtl">
@(Html.Kendo().Grid<BookStore1.Models.Author>
()
.Name("ParameterGrid")
.Columns(column =>
{
column.Bound(c => c.Id).Hidden();
column.Bound(c => c.FullName).Title("Arabic Desc");
column.Command(com =>
{
com.Edit().UpdateText("حفظ").Text("تعديل").CancelText("إلغاء").HtmlAttributes(new { type = "button", @class = "btn-basic ", });
com.Destroy().Text("حذف").HtmlAttributes(new { type = "button", @class = "btn-basic ", });
}).Width(200);
}).HtmlAttributes(new { style = "height:500px" })
//.ToolBar(toolbar =>
//{
// toolbar.ClientTemplateId("<a class='k-button' href='" + Url("Create", "Authors1") + "/test' " + ">Add product</a>" + "<a class='k-button' href='" + Url.Action("Index", "Authors1") + "/test' " + ">Other button</a>");
//})
.ToolBar(toolbar => toolbar.Create().Text("إضافة جديدة").HtmlAttributes(new { type = "button", @class = "btn-basic ", }))
.Editable(editable => editable.Mode(GridEditMode.PopUp))
.Events(e => e.Edit("NewRecord"))
.Scrollable()
.Sortable()
.Selectable()
.Filterable(f => f.Extra(false)
.Operators(opertor => opertor
.ForString(str => str.Clear()
.Contains("يحتوي على"))))
.Pageable
(p => p
.ButtonCount(10)
.Refresh(true)
)
.DataSource
(dataSourec => dataSourec
.Ajax()
.Events(e => e.Error("Error_Handler"))
.Model(m => m.Id(i => i.Id))
.Read(read => read.Action("Read", "Authors1"))
.Create(create => create.Action("Create", "Authors1"))
)
)
</div>
<div id="test"></div>
<script>
$('input[name="FullName"]').keypress(function () {
var input = $(this).val();
$.ajax({
type:"post",
url: "@Url.Action("Search","Authors")",
datatype: "html",
data: { input: input },
success: function (data) {
$("#test").html(data);//// this is work fine but I want to return partial view in kendo window here
here I need to return partial view in kendo window here
},
error: function () {
}
})
});
</script>
In picture 1: pic 1: ActualStartDate & ActualFinishDate allow null-able value.
In Picture 2: because their types allow nullable so the values of Actual Start Date & Actual Finish Date must be empty. Because I am using .DateInput(true) in the controls so now they have value 'day month year'.
I am reviewing some code and I am trying to find documentation for the UploadBlobs method with no luck.
Could someone provide a link?
Hello,
How do you generate a unique name for a control that is part of a template? I have a DropDownList in my template for a TaskBoard but only the first instance works since the name of each is the same I assume. The browser warns me too that that is the case. Appreciate any help.
-Scott