grid row mismatch after sorting
//frmStbInv
//frmContractGroupAccountList
private void gv_ShowingEditor(object sender, CancelEventArgs e)
{
int index = gv.FocusedRowHandle;
bool chk = selection.IsRowSelected(index);
if (gv.FocusedColumn.FieldName == "td_no" && !chk)
{
//未勾選的資料不可修改票號
e.Cancel = true;
}
}
private void SaveSelect()
{
DataTable dt = gcTop.DataSource as DataTable;
for (int i = 0; i < dt.Rows.Count; i++)
{
DataRow dr = selection.GetRow(i);
DataRow fdr = MainTable.Rows.Find(new object[] { gno, dr.FieldbyName("pno").asInteger });
//不可互為母戶子戶
DataRow gdr = AppFuncs.GetQueryRow(string.Format("SELECT * FROM GroupAccountList WHERE gno = {0} AND pno = {1}",
dr.FieldbyName("pno").asInteger, gno));
Written by Vito Chung
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Devexpress
Authors
Related Tags
#devexpress
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#