Skip to content

Commit 9452bd8

Browse files
committed
Disable rowclick when editing
1 parent 429f761 commit 9452bd8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Griddly/Scripts/editly.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@
7272
$(this).css("cursor", "");
7373

7474
});
75+
this.$element.find("tbody tr").each(function () {
76+
$(this).data("griddly-url", $(this).data("griddly-url-inactive"));
77+
$(this).data("griddly-url-inactive", "");
78+
});
79+
7580
for (var i = 0; i < this.options.editors.length; i++) {
7681
$(this.options.editors[i]).hide();
7782
$(this.options.editors[i]).popover("hide");
@@ -301,6 +306,10 @@
301306
else
302307
$(this).css("cursor", "default");
303308
});
309+
this.$element.find("tbody tr").each(function () {
310+
$(this).data("griddly-url-inactive", $(this).data("griddly-url"));
311+
$(this).data("griddly-url", "");
312+
});
304313

305314
$(this.$element).on("click.editly keypress.editly dblclick.editly", $.proxy(function (e) {
306315
if (doValidation()) {

Griddly/Views/Home/EditlyGrid.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@Html.Griddly(new GriddlySettings<SimpleOrder>()
66
{
77
ClassName = "editly-grid",
8+
RowClickUrl=@<text>asdfasdf</text>
89
}
910
.Column(x => x.Item,
1011
filter: x => x.FilterBox(FilterDataType.String), summaryValue: "Total")

0 commit comments

Comments
 (0)