/// <summary>
/// 列表行改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void fpSpread1_SelectionChanging(object sender, FarPoint.Win.Spread.SelectionChangingEventArgs e)
{
if (this.fpSpread1_Sheet1.ActiveRowIndex >= 0)
{
bool changeMother = isChangeMother();
bool changeBaby = isChangeBaby();
if (changeMother)
{
if (InductionAdmissionRecords == null || string.IsNullOrEmpty(InductionAdmissionRecords.ID))
{
mode = 0;
}
else
{
mode = 1;
}
DialogResult dr = MessageBox.Show("是否保存修改的信息?", "修改提示框", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);
if (dr == DialogResult.Yes)
{
id = this.fpSpread1_Sheet1.Cells[e.CurrentRow, 0].Value.ToString();
save();
refreshList();
this.BeginInvoke(
(System.Threading.ThreadStart)delegate()
{
this.Focus();
int t = e.CurrentRow;
if (this.fpSpread1_Sheet1.RowCount > t)
{
this.fpSpread1_Sheet1.ActiveRowIndex = t;
this.fpSpread1_Sheet1.AddSelection(t, 0, 1, 1);
}
}
);
return;
}
}
使用FPSpread:点击第一行切换到第二行后提示信息,点击是,使用异步委托后光标没有定位!哪位高手来解答下。
/// 列表行改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void fpSpread1_SelectionChanging(object sender, FarPoint.Win.Spread.SelectionChangingEventArgs e)
{
if (this.fpSpread1_Sheet1.ActiveRowIndex >= 0)
{
bool changeMother = isChangeMother();
bool changeBaby = isChangeBaby();
if (changeMother)
{
if (InductionAdmissionRecords == null || string.IsNullOrEmpty(InductionAdmissionRecords.ID))
{
mode = 0;
}
else
{
mode = 1;
}
DialogResult dr = MessageBox.Show("是否保存修改的信息?", "修改提示框", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);
if (dr == DialogResult.Yes)
{
id = this.fpSpread1_Sheet1.Cells[e.CurrentRow, 0].Value.ToString();
save();
refreshList();
this.BeginInvoke(
(System.Threading.ThreadStart)delegate()
{
this.Focus();
int t = e.CurrentRow;
if (this.fpSpread1_Sheet1.RowCount > t)
{
this.fpSpread1_Sheet1.ActiveRowIndex = t;
this.fpSpread1_Sheet1.AddSelection(t, 0, 1, 1);
}
}
);
return;
}
}
使用FPSpread:点击第一行切换到第二行后提示信息,点击是,使用异步委托后光标没有定位!哪位高手来解答下。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货