I have a PopupMenuTool with a StateButtonTool and a TextBoxTool. Both Tools are set with data when I click anywhere on the grid:
DataObject data = ...((TextBoxTool)bmMain.Tools["ParameterSet.Name"]).Text = data.Name;((StateButtonTool)bmMain.Tools["ParameterSet.DefaultSet"]).Checked = data.IsDefaultSet;// Show the ContextMenu bmMain.ShowPopup("Menu.ParameterSet", gridMain, mousePoint);
DataObject data = ...((TextBoxTool)bmMain.Tools["ParameterSet.Name"]).Text = data.Name;((StateButtonTool)bmMain.Tools["ParameterSet.DefaultSet"]).Checked = data.IsDefaultSet;
// Show the ContextMenu bmMain.ShowPopup("Menu.ParameterSet", gridMain, mousePoint);
How can I receive the change of the "Text"-Value in the TextBoxTool and the change of the "Checked"-Value on the StateButtonTool, when the user interact with my menu?
data.Name = ...data.IsDefaultSet = ...
Michael
In the Checked property setter, the value is stored before the event is fired. Is it possible the property is being set in multiple places and it is getting the wrong value from somewhere? If not, it could be a bug and I would recommend submitting the issue to the support group: http://ko.infragistics.com/gethelp.
Hi Mike,
Mike Dour"]To know when the Checked property changes for a StateButtonTool, you have to handle the ToolClick event.
Unfortunatly the StateButtonTool doesn't have the correct Checked value during this event. It seams that the Cecked value is changed after the ToolClick event occured.
The ToolValueChanged event will only fire for editor tools (TextBoxTool, ProgressBarTool, PopupColorPickerTool, MeskedEditTool, ComboBoxTool, and FontListTool). To know when the Checked property changes for a StateButtonTool, you have to handle the ToolClick event. You can also handle the PropertyChanged event to determine when the Checked property changes, but you will have to walk down the prop change chain to determine which property changed.