int iCnt = 0;
private void fpMain_EditModeOn(object sender, EventArgs e)
{
if (fpMainSheet.ActiveColumnIndex == 17)
{
FarPoint.Win.FpCombo cmb = new FarPoint.Win.FpCombo();
cmb = (FarPoint.Win.FpCombo)fpMain.EditingControl;
if (iCnt < 1) cmb.SelectedValueChanged += new EventHandler(this.cmb_SelectedValueChanged);
}
}
private void cmb_SelectedValueChanged(object sender, EventArgs e)
{
if (((FarPoint.Win.FpCombo)sender).SelectedIndex > -1)
{
iCnt++;
int iRow = fpMainSheet.ActiveRowIndex;
int iCol = fpMainSheet.ActiveColumnIndex;
FarPoint.Win.FpCombo combo = (FarPoint.Win.FpCombo)sender;
string strKey = combo.ItemData[combo.SelectedIndex].ToString();
fpMainSheet.SetValue(iRow, 28, strKey);
}
}