Skip to content

Commit

Permalink
Add a generic version of GridPage extension that accepts row type to …
Browse files Browse the repository at this point in the history
…determine page title
  • Loading branch information
volkanceylan committed Sep 11, 2024
1 parent 8ec5078 commit 54eb910
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ public static string PageTitle(this RowFieldsBase fields)
return "Db." + fields.LocalTextPrefix + ".EntityPlural";
}

public static ViewResult GridPage<TRow>(this Controller controller, string module,
object options = null, LocalText pageTitle = null)
where TRow: IRow, new()
{
return GridPage(controller, module, pageTitle ?? new TRow().Fields.PageTitle(), options);
}

public static ViewResult GridPage(this Controller controller, string module, LocalText pageTitle,
object options = null)
{
Expand Down

0 comments on commit 54eb910

Please sign in to comment.