Skip to content

Commit 38bbc4c

Browse files
committed
Make a's inside cells separately clickable and not trigger rowclick
1 parent a498f7f commit 38bbc4c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Griddly/Scripts/griddly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
{
179179
$(this.options.rowClickModal).removeData("modal").modal({ remote: url });
180180
}
181-
else
181+
else if (!$(e.target).is("a"))
182182
{
183183
if (e.which == 2 || e.ctrlKey)
184184
window.open(url);

Griddly/Views/Home/FilterBoxGrid.cshtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55

66
@Html.Griddly(new GriddlySettings<TestGridItem>()
77
{
8-
PageSize = 5
8+
PageSize = 5,
9+
RowClickUrl = x => "http://microsoft.com"
910
}
11+
.TemplateColumn(@<a href="http://google.com">google</a>, "test")
1012
.Column(x => x.Test)
1113
.Column(x => x.FirstName, "First Name")
1214
.Column(x => x.LastName, "Last Name", defaultSort: SortDirection.Ascending, filter: x => x.FilterBox(FilterDataType.String))

0 commit comments

Comments
 (0)