> We provide a way to customize the customization dialog. This should allow you to display whatever you want when the user invokes customization.
>
> Please refer to the online documentation for
MainFrameBarManager.CustomizationPanel. If you have any questions about it, please let me know.
I inherit my own control from CustomizationPanel to change BarItem''s texts in commands grid. But my changes don''t apply. Grid always show standard BarItem text.
This is my implementation:
using System;
using System.Diagnostics;
using System.Windows.Forms;
using Syncfusion.Windows.Forms.Grid;
using Syncfusion.Windows.Forms.Tools.XPMenus;
namespace zLocalizeTest
{
///
/// Summary description for CustPanel.
///
public class CustPanel : CustomizationPanel
{
public CustPanel()
{
gridHostPanel.ControlAdded += new ControlEventHandler(gridHostPanel_ControlAdded);
}
private void gridHostPanel_ControlAdded(object sender, ControlEventArgs e)
{
MenuGridControlCustomizable ctrl = gridHostPanel.Controls[0] as MenuGridControlCustomizable;
ctrl.UpdatingChanged += new EventHandler(ctrl_UpdatingChanged);
}
private void ctrl_UpdatingChanged(object sender, EventArgs e)
{
MenuGridControlCustomizable grid = sender as MenuGridControlCustomizable;
if(grid == null) return;
try
{
grid.UpdatingChanged -= new EventHandler(ctrl_UpdatingChanged);
GridModel model = grid.Model;
for(int row=1; row<=model.RowCount; row++)
{
GridStyleInfo info = model[row, 2];
if(info.CellValueType != typeof(string)) continue;
info.CellValue = (string)info.CellValue + "aaa";
Debug.WriteLine(info.CellValue);
}
}
catch(Exception ex)
{
Debug.WriteLine(ex);
}
finally
{
grid.UpdatingChanged += new EventHandler(ctrl_UpdatingChanged);
}
}
}
}