第1个回答 2010-01-04
public delegate void Handler(FlexCell.Grid param1, int param2);
/// <summary>
/// 锁定行(供线程内部使用)
/// </summary>
/// <param name="cellGrid">需要锁定的Flex控件</param>
/// <param name="row">需要锁定的行</param>
public static void lockCell(FlexCell.Grid cellGrid, int row)
{
//EventHandler ehLockCell = new EventHandler(flexCell_Lock);
//ehLockCell(this, null);
if (cellGrid.InvokeRequired)
{
//Handler handlock = new Handler(lockCell);
cellGrid.Invoke(new Handler(lockCell), new object[] { cellGrid, row });
}
else
{
lock (cellGrid)
{
//FlexCell.Grid cellBanlance = (FlexCell.Grid)tabBalance.TabPages["2008"].Controls[0];
cellGrid.Row(row).Locked = true;
cellGrid.Range(row, 2, row, cellGrid.Cols - 1).BackColor = AppHelper.MatchColorScheme(6);
}
}
}本回答被提问者采纳