MasterGridViewElement Hyperlink
Is there a way to add a hyperlink to the MasterGridViewElement Title?
I managed to insert a hyperlink by wrapping the title like this "<a href="">Title</a>" but then it tells me the resource for the title is invalid.
Hi Kristian,
In what part of the site do you insert this? What is the template that you modify?
Kind regards,Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
This is in the DefineBackendContentView class for the Module Definitions
// Title
var ctitleTemplateBuilder = new System.Text.StringBuilder();
ctitleTemplateBuilder.Append(@"<
a
href
=
""
Sitefinity/Content/MyModule""
class
=
""
sf_binderCommand_filterByTag");
ctitleTemplateBuilder.Append(@""">MyModuleViewTitle</
a
>");
var rfqsGridView = new MasterGridViewElement(backendContentView.ViewsConfig)
ViewName = MyModuleDefinitions.BackendListViewName,
ViewType = typeof(MasterGridView),
AllowPaging = true,
DisplayMode = FieldDisplayMode.Read,
ItemsPerPage = 50,
ResourceClassId = typeof(MyModuleResources).Name,
SearchFields = "Title",
SortExpression = "Title ASC",
Title = ctitleTemplateBuilder.ToString(),
WebServiceBaseUrl = "~/Sitefinity/Services/Content/MyModule.svc/"
;
Hi Kristian,
I believe the Title value is a name of a resource, not the actual string. We changed the way the configuration are defined now - we use FluentApi instead. Here is an example:
1.
var fluentDetailView = fluentContentView
2.
.AddDetailView(viewName)
3.
.SetTitle(
"EditDocument"
)
4.
.LocalizeUsing<DocumentsResources>()
5.
.SetExternalClientScripts(externalScripts)
6.
.SetServiceBaseUrl(
"~/Sitefinity/Services/Content/DocumentService.svc/"
)
7.
.SetAlternativeTitle(
"CreateItem"
);
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>