CheckAction does not invoke checked_change event 2

StatusIDPriorityType
Closed33326BlockerQuestion
ProfileReply
nickcoleClient

from https://galaktika-soft.com/tickets/checkaction-does-not-invoke-checked_change-event-2
I have question about checkaction.
I do as your guid.
But I can not let che checkaction have 'backcolor'
Please see my project.

Attached files:

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello nickcole!

Sorry for the delay with the answer.

To set backColor for Action, insert this controller into the project.

public class CustomAddBarButtonItemCheckActionController: Controller
{
protected override void OnActivated()
{
base.OnActivated();
var controller = Frame.GetController();
controller.CustomAddActionControlToContainer += controller_CustomAddActionControlToContainer;
}void controller_CustomAddActionControlToContainer(object sender, DevExpress.ExpressApp.Templates.ActionControls.CustomAddActionControlEventArgs e)
{
if (e.Action is CheckAction)
{
e.Handled = true;
var container = e.Container as BarLinkActionControlContainer;var buttonItem = new BarButtonItem();
container.BarContainerItem.AddItem((BarItem)buttonItem);
buttonItem.Caption = e.Action.Caption;
buttonItem.ButtonStyle= BarButtonStyle.Check;
ISimpleActionControl simpleActionControl = (ISimpleActionControl)new BarButtonItemSimpleActionControl(e.Action.Id, buttonItem);
container.AddActionControl((IActionControl)simpleActionControl);
}
}
}

Regards,
Mariya
On behalf of Xafari Client Services Team

× This ticket is closed.

Write US