SharePoint 2010 Taxonomy Control Multi Value - sharepoint-2010

I´m using the Taxonomy Control in my Webpart for selecting documents from a document library using MMD. I tried to set more than one MMD-Value in my WebPart Options but it is only taking one value. Below is my code with the property IsMulti=true.
Is there anything more I have to do, to get a Multi value Tax Control?
Thanks and Kind regards
Daniel
rel3DeptsTaxCtrl = new TaxonomyWebTaggingControl();
rel3DeptsTaxCtrl.ID = "rel3DeptsTaxCtrl";
rel3DeptsTaxCtrl.SspId.Add(termStore.Id);
rel3DeptsTaxCtrl.TermSetId.Add(productsTermSet.Id);
rel3DeptsTaxCtrl.IsAddTerms = false;
rel3DeptsTaxCtrl.AllowFillIn = false;
respDeptTaxCtrl.IsMulti = true;
respDeptTaxCtrl.IsUseCommaAsDelimiter = true;
rel3DeptsTaxCtrl.Text = webpart._Relevanz3;
toolPartPanel.Controls.Add(rel3DeptsTaxCtrl);

From what I see in your code sample you have 2 controls - rel3DeptsTaxCtrl and respDeptTaxCtrl. The control that is added to the tool part panel is not set to allow multiple values.

Related

How to clean existing properties and replace with metadata template on Photoshop (scripting)?

While creating a script that would automate all the different tasks I do when I start working on a new picture on Photoshop, I encountered the following problem.
Manually, I would Ctrl + Alt + Shift + I, click on the template I want and choose the option "Clear existing properties and replace with template properties".
I can't find the way to do precisely this. The best thing I managed to find is something like this :
app.activeDocument.info.author = "test";
app.activeDocument.info.caption = "";
app.activeDocument.info.captionWriter = "";
app.activeDocument.info.headline = "";
app.activeDocument.info.instructions = "";
app.activeDocument.info.keywords = "";
app.activeDocument.info.authorPosition = "";
app.activeDocument.info.credit = "";
app.activeDocument.info.source = "";
app.activeDocument.info.category = "";
app.activeDocument.info.supplementalCategories = "";
app.activeDocument.info.title = "";
// etc.
And it actually doesn't really work like the "Clear existing properties and replace with template properties".
I didn't find anything on the Photoshop scripting guide, nor on the internet. Any help would be greatly appreciated !
What I think is the problem is Photoshop separates file-metadata from its activeDocument-metadata. What you see in "File info..." (via Ctrl+Alt+Shift+I) is supposed to represent the file in the filesystem, which metadata is embedded in.
There are several scripting guides to Photoshop scripting. I think the one relevant for you would be "Javascript Tools Guide", specifically the chapter 10 "Scripting Access to XMP Metadata".
Is it important for you to set up the metadata already when creating a new picture? If not, you may want to look at a solution using a customized export script.
It customizes XMP-metadata upon exporting like
Create a basic metadata object:
var meta = new XMPMeta();
Provide a namespaceURI (see XMP specs) known to photoshop along with tag name, and value:
meta.setProperty(XMPConst.NS_XMP, "CreatorTool", app.version);
Save the image temporarily (using other script):
var imgFile = new File(fileName);
saveImage(fileName);
Finish saving by adding the metadata-object:
var metaFile = new XMPFile(imgFile.fsName, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
if (metaFile.canPutXMP(meta)) { metaFile.putXMP(meta); }
metaFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
Doing it this way also erases any existing or default metadata.

Add Image to Custom Task Pane Title in Outlook - VB.Net

I have created a custom task pane in VB.Net for Outlook using the Code given below and I would like to add more content to the header (image and a button) of the User Control instead of just the title. Is there a way I can achieve this?
myUserControl1 = New OutlookTaskPane
myUserControl1.TabStop = True
Dim width As Integer = myUserControl1.Width
myCustomTaskPane = Me.CustomTaskPanes.Add(myUserControl1, "My Custom Task Pane")
myCustomTaskPane.Width = width
myCustomTaskPane.Visible = True
myCustomTaskPane.DockPositionRestrict = Microsoft.Office.Core.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange
Let me know if there is any other way of achieving this please.
Thanks.
Unfortunately the TaskPane header is not customizable. Only Add-in Express supports similar customizations using their implementation of Advanced Form Regions (although only the header icon and header color can be changed and you can't add Windows Forms controls to it). Another option is to implement your own type of Task Pane so you have complete control over the UI; see https://code.msdn.microsoft.com/OlAdjacentWindows/.

Unable to add grid title to gridview using DevExpress vb.net

I've tried the following code found on the DevExpress site but I get a NullReferenceException
at the view.Bands.Clear()
Dim view As BandedGridView = TryCast(gridControl1.MainView, BandedGridView)
view.Bands.Clear()
'Create the bands layout.
Dim bandProdInf As GridBand = view.Bands.Add()
bandProdInf.Caption = "Notification Details - Drilling"
This would be the look of the gridview that I would like:
https://www.devexpress.com/Support/Center/Attachment/GetAttachmentFile/e5cb046f-fb25-46a4-9ae8-25ba612daa01
"Notification Details - Drilling" would appear as the title of the gridview.
The support team from devexpress provided the following right answer:
The GridView offers a built-in mechanism for showing a title via the ViewCaption property. Additionally you will want to set the GridView's OptionsView.ShowViewCaption property to True.
So you would do the following:
gridview1.ViewCaption = "Grid view title"
gridview1.OptionsView.ShowViewCaption = True
Captions must be enabled, they're disabled by default.
Add:
view.OptionsView.ShowViewCaption = true;

Enable show as conversation in outlook programatically

i am creating an Outlook add-in where i need to enable Conversation view in inbox folder("Show as Conversation") in outlook.i tried through registry Key ("Upgrade To Conversations"),but still i didn't get that.
i tried as following
RegistryKey rkconversations = Registry.CurrentUser.CreateSubKey(#"Software\Microsoft\Office" + OLVersion + #"\Outlook\Setup");
rkconversations.SetValue("UpgradeToConversations", "1", RegistryValueKind.DWord);
i aslo tried like this:
Outlook.Views views = inbox.Views;
Outlook.View view = views["Hide Reading Pane"];
if (view != null)
view.Delete();
Outlook.View view1 = views.Add("Hide Reading Pane", Outlook.OlViewType.olTableView,
Outlook.OlViewSaveOption.olViewSaveOptionThisFolderOnlyMe);
tableView = view1 as Outlook.TableView;
tableView.ShowReadingPane = false;
tableView.ShowConversationByDate = true;
tableView.ShowConversationSendersAboveSubject = true;
tableView.ShowFullConversations = true;
view1.Save();
view1.Apply();
Show as Conversations is not enabled
Try to do the required modifications in Outlook manually. Then take a look at the XML property of the View/TableView object and compare it with your own. Thus, you may find the missed point.

Kendo UI Combo Box Reset Value

I'm using the Kendo UI ComboBoxes in cascade mode to build up a filter that I wish to apply.
How do I clear/reset the value of a Kendo UI ComboBox?
I've tried:
$("#comboBox").data("kendoComboBox").val('');
$("#comboBox").data("kendoComboBox").select('');
$("#comboBox").data("kendoComboBox").select(null);
all to no avail. The project is an MVC4 app using the Razor engine and the code is basically the same as the Kendo UI example.
If you want to use select the you need to provide the index of the option. Otherwise use text
$("#comboBox").data("kendoComboBox").text('');
Example: http://jsfiddle.net/OnaBai/4aHbH/
I had to create my custom clear function extending involved Kendo UI controls like the following:
kendo.ui.ComboBox.fn.clear = kendo.ui.AutoComplete.fn.clear = function () {
if (!!this.text) {
this.text("");
}
if (!!this.value) {
this.value(null);
}
this._prev = this.oldIndex = this._old = this._last = undefined;
};
Then you can call $("mycontrol").data("kendoAutoComplete").clear(); to clear the control and have the change handler invoked when doing the following: select an item, clear and select again the previous item.
This also works:
$("#comboBox").data("kendoComboBox").value(null);
I've found these options below seem to work to reset the kendo combo box. You can run $("#comboBox").data("kendoComboBox").select() after trying two below and you should see a value returned of -1, indicating its reset.
$("#comboBox").data("kendoComboBox").value('')
$('#comboBox').data().kendoComboBox.value('')
$("#comboBox").data("kendoComboBox").select(-1)
$('#comboBox').data().kendoComboBox.select(-1)