ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
GRID with FilterRow & CheckBox on first column generated an error "Failed to execute 'getComputedStyle' on 'Window'"
Title:
B
I
{code}
?
when you combine GRID with "FilterRow" & "Selectable" & "CheckBox" features, grid in javascript console is logged an error "Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'." and "can't find element cId" - JQuery version 3.6.0 - ASP.NET CORE solution with ASPAWESOME 6.7.3: my grid defintion: @(Html.Awe().Grid("grid") .Mod(o => o.PageInfo().PageSize().ColumnsAutohide().FilterRow(keyupsel: ".awe-txt:not(.awe-dtp)")) .Url(Url.Page("","GridGetItems")) .Resizable().Reorderable().Groupable(false).ShowGroupBar(false).Selectable(SelectionType.Multicheck).SendColumns(true).Persistence(Persistence.Session) .Columns( new Column { Width = 40, ClientFormat = Html.Awe().CheckBox("Id").Ochk().Prefix("c.(Id)").HtmlAttributes(null, new { data_val = ".(Id)" }).ToString(), Header = Html.Awe().CheckBox("ChkAll").Ochk().SyncScript().ToString() }, new Column { Id = "grid_actions", ClientFormat = detail + " " + edit, Width = 70, CssClass = "center", Header = "Actions" }, new Column { Bind = "Id", Hidden = true }, new Column { Bind = "Name", ClientFormatFunc = "formatName" }.Mod(o => o.Filter(Html.Awe().TextBox("Name").Placeholder("Name").ClearButton())) )) Is there any workaround how to fix it?
Save Changes
Cancel
Erik
asked at 02 Apr 2021
you can easily to simulate it in your demo app: AweCoreDemo - where in "Index.cshtml" in "GridCheckboxesDemo" folder replace previous version: @(Html.Awe().Grid("GridChk") ..... with @(Html.Awe().Grid("GridChk").Mod(o => o.FilterRow(keyupsel: ".awe-txt:not(.awe-dtp)")) issue is then visible in console
at 02 Apr 2021
Erik
try editing `awem.js`, after line: row = $(o.api.renderRow({})); add row.children().each(function(_, el) { $(el).empty(); });
at 02 Apr 2021
Omu
Thanks, it is working now !
at 02 Apr 2021
Erik
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK