private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			FormDisplayFieldEdit formD=new FormDisplayFieldEdit();
			formD.FieldCur=ListShowing[e.Row];
			DisplayField tempField=ListShowing[e.Row].Copy();
			formD.ShowDialog();
			if(formD.DialogResult!=DialogResult.OK) {
				ListShowing[e.Row]=tempField.Copy();
				return;
			}
			if(category==DisplayFieldCategory.OrthoChart) {
				if(ListShowing[e.Row].Description=="") {
					ListShowing[e.Row]=tempField.Copy();
					MsgBox.Show(this,"Description cannot be blank.");
					return;
				}
				for(int i=0;i<ListShowing.Count;i++) {//Check against ListShowing only
					if(i==e.Row) {
						continue;
					}
					if(ListShowing[e.Row].Description==ListShowing[i].Description) {
						ListShowing[e.Row]=tempField;
						MsgBox.Show(this,"That field name already exists.");
						return;
					}
				}
				for(int i=0;i<AvailList.Count;i++) {//check against AvailList only
					if(ListShowing[e.Row].Description==AvailList[i].Description) {
						ListShowing[e.Row]=tempField;
						MsgBox.Show(this,"That field name already exists.");
						return;
					}
				}
			}
			FillGrids();
			changed=true;
		}
Example #2
0
 private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e)
 {
     FormDisplayFieldEdit formD=new FormDisplayFieldEdit();
     formD.FieldCur=ListShowing[e.Row];
     formD.ShowDialog();
     FillGrids();
     changed=true;
 }