Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, I'm trying to create a custom macro parameter type. I followed the post
http://www.richardsoeteman.net/2010/01/04/CreateACustomMacroParameterType.aspx
I have a node with a macro that has the "save cookie" parameter.
After select the second option and save it, it saved correctly, however, the next time i access to the node, appears the first option in the dropdownlist.
Does anyone know how to get the saved value?
Thanks
think I found a solution...
public class SOMENEWMACROPARAM: DropDownList, IMacroGuiRendering { string _value = ""; protected override void OnLoad(EventArgs e) { base.OnLoad(e); // your custom dropdown list population here... try {//set the previous value this.Items.FindByValue(_value.ToString()).Selected = true; } catch { } catch { } } } #region IMacroGuiRendering Members public bool ShowCaption { get { return true; } } public string Value { get { return this.SelectedValue; } set { this._value = value; } } #endregion
Seems to be working for me... :-)
Thanks for the solution!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to get dropdownlist item after being saved - Custom macro parameter type
Hi, I'm trying to create a custom macro parameter type. I followed the post
http://www.richardsoeteman.net/2010/01/04/CreateACustomMacroParameterType.aspx
I have a node with a macro that has the "save cookie" parameter.
After select the second option and save it, it saved correctly, however, the next time i access to the node, appears the first option in the dropdownlist.
Does anyone know how to get the saved value?
Thanks
think I found a solution...
Seems to be working for me... :-)
Thanks for the solution!
is working on a reply...