Posted on 23/07/2020 04:13:36
Hi,
I think the only way you can achive this by adding "ribonbar addin" where you have the current orders from the list
something like
[AddInTarget(RibbonBarAddInTarget.eCom.OrderList)]
public class MyAddin : RibbonBarAddIn
{
/// <summary>
/// Initializes a new instance of the MyAddin class.
/// </summary>
public MyAddin(RibbonBar ribbon)
: base(ribbon)
{
}
public override void Load()
{
// To learn more about RibbonBarAddIns, check out: http://developer.dynamicweb-cms.com/documentation/for-developers/cms-extensibility/ribbon-bar.aspx
RibbonBarGroup group = base.CreateDefaultContainer();
RibbonBarButton button = new RibbonBarButton();
group.Name = "My group";
group.AddItem(button);
// Access the DataContext which is a Order collection for this AddIn.
IEnumerable(Of Order) orders = base.Ribbon.DataContext.DataSource as IEnumerable(Of Order);
button.Text = "Icon";
button.Image = Dynamicweb.Controls.Icons.Icon.Type.CheckDocument;
// Alternatively, specify your own Image path:
// button.ImagePath = "/Admin/SomeImage.png";
button.Size = Dynamicweb.Controls.Icons.Icon.Size.Large;
button.EnableServerClick = true;
button.Click += button_Click;
group.Active = false;
}
void button_Click(object sender, EventArgs e)
{
// Handle click here
}
}
This is just sketch, but I hope that will help.
BR, Viktor.