Is there any way at all to disable a link on a node?
For example, I would like to disable the "Dashboards" menu item/node, ie, clicking on it on the site will do nothing.
Is this possible?
thanks,
KS
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode title="" url="">
<siteMapNode title="BI Home" url="/Home.aspx"/>
<siteMapNode title="Scorecards" url="/Scorecards.aspx">
<siteMapNode title="Performance Scorecard" url="/Perfomance-Card.aspx"/>
<siteMapNode title="Quality Scorecard" url="/Quality-Card.aspx"/>
<siteMapNode title="Service Scorecard" url="/Service-Card.aspx"/>
<siteMapNode title="Financial Operations Scorecard" url="/FinancialOps-Card.aspx"/>
</siteMapNode>
<siteMapNode title="Dashboards">
<siteMapNode title="Executive Dashboard" url="/Executive-Dash.aspx"/>
<siteMapNode title="Operational Scorecard" url="/Operational-Card.aspx"/>
</siteMapNode>
<siteMapNode title="Manual Entry">
<siteMapNode title="Labor Hours" url="/Labor-Hours.aspx"/>
<siteMapNode title="Lost Time Accidents" url="/Lost-Time-Accidents.aspx"/>
<siteMapNode title="Action Items" url="/Action-Items.aspx"/>
</siteMapNode>
<siteMapNode title="Reports" url="/Reports.aspx"/>
</siteMapNode>
</siteMap>
Ok, so I settled for second best. What is second best?
Well, I set the main menu item to the same url as the first option beneath it.
But you cannot have duplicate urls in the sitemap nodes I hear you say!
Bypassed this by appending a querystring parameter to the end of the url.
I changed dashboards like so:
<siteMapNode title="Dashboards" url="/Executive-Dash.aspx?S=1"/>
Not very elegant but it is acceptable for my sce
Related
First of all, let me clarify that I am using Blazor and what I want is to display the data from a web service (XML) to my Blazor RadzenDataGrid component.
I found out how to do it with a database model, which is posed as follows:
<RadzenDataGrid id="tabla_trabajadoresSinUs" style="display: none" AllowFiltering="true" AllowColumnResize="true"
FilterMode="FilterMode.Simple" PageSize="5" AllowPaging="true" AllowSorting="true" Data="#personas" TItem="SisPersona" ColumnWidth="150px"
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
LogicalFilterOperator="LogicalFilterOperator.Or">
<Columns>
<RadzenDataGridColumn TItem="SisPersona" Property="Id" Title="Id" Frozen="true" TextAlign="TextAlign.Center" Width="100px" />
<RadzenDataGridColumn TItem="SisPersona" Property="Nombre" Title="Nombre" TextAlign="TextAlign.Center" Width="100px"/>
<RadzenDataGridColumn TItem="SisPersona" Property="Nif" Filterable="false" TextAlign="TextAlign.Center" Title="Código Tarea" Width="100px" />
<RadzenDataGridColumn TItem="SisPersona" Property="Direccion" Filterable="false" Title="Usuario I." Width="100px" />
</Columns>
</RadzenDataGrid>
#code {
DataBaseContext db = new DataBaseContext();
IEnumerable<SisPersona> personas;
protected override void OnInitialized() {
personas = db.SisPersonas;
}
}
But this is not what I really want, I integrated my web services in my project and through a method of my web service (GetStaffMemebers()) that I have in a class I want it to display that information in my RadzenDataGrid, is there supposed to be a way to do this?
The bottom line is that I don't know how to adapt a web service in this Blazor component.
Help is appreciated as always!
When adding items to a context menu (ribbon) in a VSTO outlook add-in (for Outlook 2009+), is there a way to use the same context menu for multiple idMso (i.e., I'd like to add the same items for when single or multiple emails are selected)? I tried the xml below, but the schema doesn't like that I'm re-using the same button id in multiple places.
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<contextMenus>
<contextMenu idMso="ContextMenuMailItem">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
<contextMenu idMso="ContextMenuMultipleItems">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
</contextMenus>
</customUI>
Ideally I guess I'd like something like this:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<contextMenus>
<contextMenu idMso="ContextMenuMailItem,ContextMenuMultipleItems">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
</contextMenus>
</customUI>
Reusing id attribute is not possible, but there is another attribute that is reusable - tag:
<button id="DoThis1" tag="DoThis" ... />
<button id="DoThis2" tag="DoThis" />
Then in the code then you can determine the command not by Id but by Tag property of the control.
<siteMapNode url="Customer support.aspx" title="Customer support" description=""/>
<siteMapNode url="ProductRegistration.aspx" title="Register products" description=""/>
<siteMapNode url="CustomerSurvey.aspx" title="Complete customer survey" description=""/>
<siteMapNode url="ContactUs.aspx" title="Contact us" description=""/>
<siteMapNode url="TechnicianSupport.aspx" title="Technician support" description=""/>
<siteMapNode url="CustomerIncidentDisplay.aspx" title="Display customer incidents" description=""/>
<siteMapNode url="IncidentUpdate.aspx" title="Update incidents" description="">
</siteMapNode>
<siteMapNode url="Administration.aspx" title="Administration" description=""/>
<siteMapNode url="ProductMaintenance.aspx" title="Maintain products" description=""/>
<siteMapNode url="CustomerMaintenance.aspx" title="Maintain customers" description=""/>
<siteMapNode url="TechnicianMaintenance.aspx" title="Maintain technicians" description=""/>
<siteMapNode url="IncidentCreation.aspx" title="Create incidents" description=""/>
<siteMapNode url="TechnicianIncidentSummary.aspx" title="Display techninican incidents" description=""/>
<siteMapNode url="IncidentAssignment.aspx" title="Assign incidents" description=""/>
<siteMapNode url="IncidentDisplay.aspx" title="Display incidents" description=""/>
<siteMapNode url="CustomerDisplay.aspx" title="Display customers" description=""/>
<siteMapNode url="Map.aspx" title="Site Map" description="">
</siteMapNode>
It doesn't turn out exactly right... When I add a TreeView to my Map.aspx webpage It shows Home as the only Parent Node. Home should be the main with Customer Support, Technician support, and administration as the next head nodes then all others under that.
Does this make sense?
Home is the root node that all the other nodes are under.
I've never used the TreeView personally, but when I used a SiteMapDataSource to build a navigation menu, I set ShowStartingNode="false" to skip the root node.
I am trying to customize the look of the outputted layout for the MVCSiteMap and have been modifying the MenuHelperModel.cshtml with some success. The only problem I have is I can not figure out how to make how to make sub lists of the first SiteMapNode? Currently the output looks like:
•Home
•Contact US
•News
Sports
•About
But what I want it to look like is:
•Home
Contact US
•News
Sports
•About
I am unable to figure out how to make the Contact Us link a sub-componate of the Home link, like Sprots is for News.
Here is my SiteMap code:
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0"
xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0 WebSiteMapSchema.xsd"
enableLocalization="true">
<mvcSiteMapNode title="Home" controller="Home" action="Index">
<mvcSiteMapNode title="Contact US" controller="Home" action="Contact" />
<mvcSiteMapNode title="News" controller="Home" action="News">
<mvcSiteMapNode title="Sports" controller="Home" action="Sprots" />
</mvcSiteMapNode>
<mvcSiteMapNode title="About" controller="Home" action="About"/>
</mvcSiteMapNode>
</mvcSiteMap>
And the MenuHelperModel.cshtml:
#model MvcSiteMapProvider.Web.Html.Models.MenuHelperModel
#using System.Web.Mvc.Html
#using MvcSiteMapProvider.Web.Html.Models
<ul>
#foreach (var node in Model.Nodes) {
<li>#Html.DisplayFor(m => node)
#if (node.Children.Any()) {
#Html.DisplayFor(m => node.Children)
}
</li>
}
</ul>
What do I have to modify so that the Contact Us becomes a child of the Home link?
I think I figured it out, it looks like if I use this code to render the SiteMap it does not display the first node, this will allow me to build a new home menu and add child options. I have yet to try this on sub pages since I only have an index page built. Once I test it on sub pages to make sure it still displays correctly I will update.
#Html.MvcSiteMap().Menu(false)
I want a gridpane layout as in the attached image. Anyone know how to this or am I using the wrong layout?
You can control how different rows and columns in a GridPane grow using column and row constraints.
The way to do this is to set the hgrow property of the first column to ALWAYS, and the vgrow property of the first row to ALWAYS - this means the top left cell will always expand. You can either set the other cells to fixed widths/heights, or otherwise they will expand to fit their contents and no more.
I've included an FXML example with the GridPane inside an AnchorPane, and anchored to the top, left bottom and right of the AnchorPane. This means that the GridPane will grow to fill the parent AnchorPane:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml">
<children>
<GridPane AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints prefWidth="150" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
<RowConstraints prefHeight="150" />
</rowConstraints>
</GridPane>
</children>
</AnchorPane>
This results in the layout shown here, and expands to fill the parent pane:
Turns out what I am trying to do requires AnchorPane and GridPane.