//_________________________________________________________________________________________________________ public bool MarkAttribute(string sAttrib) { int RowValor = GetRowIndex(sAttrib); if (RowValor >= 0) { LogDebug(string.Format("MarkAttribute({0})", sAttrib)); GridHelper.MarkRow(dg, RowValor); return(true); } LogError(string.Format("MarkAttribute({0})", sAttrib)); return(false); }
//_________________________________________________________________________________________________________ //_________________________________________________________________________________________________________ private void dgValues_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { var hti = dgValues.HitTest(e.X, e.Y); if (hti.RowIndex >= 0 && hti.RowIndex < dgValues.Rows.Count) { GridHelper.MarkRow(dgValues, hti.RowIndex); if (SelectedRows.Contains(dgValues[0, hti.RowIndex].Value.ToString())) { SelectedRows.Remove(dgValues[0, hti.RowIndex].Value.ToString()); } else { SelectedRows.Add(dgValues[0, hti.RowIndex].Value.ToString()); } SaveScreenData(); } } }