private void gvLine_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { GridView gv = gvLine; lblStatus.Text = "* Edit Line"; lblStatus.ForeColor = Color.Red; string strLineName = gv.GetFocusedRowCellValue("LineName").ToString(); string strLineID = gv.GetFocusedRowCellValue("LineID").ToString(); string strInChargeID = gv.GetFocusedRowCellValue("InChangeID").ToString(); string strBranchID = gv.GetFocusedRowCellValue("BranchID").ToString(); string CusID = gv.GetFocusedRowCellValue("CustomerID").ToString(); //MessageBox.Show(strLineID); txeID.Text = strLineID; glueBranch.EditValue = strBranchID; glueLineName.EditValue = strLineID; slueInCharge.EditValue = strInChargeID; slueCustomer.EditValue = CusID; glueCREATE.EditValue = gv.GetFocusedRowCellValue("CreatedBy").ToString(); txeCDATE.Text = gv.GetFocusedRowCellValue("CreatedDate").ToString(); } }
private void viewMouseMove(object sender, MouseEventArgs e) { if (_downHitInfo == null) { return; } var cursorLocation = getCursorLocationRelativeToGrid(sender, e); if (isNotValidMouseMove(e, cursorLocation)) { return; } var curve = _gridBinderCurves.ElementAt(_downHitInfo.RowHandle); if (hitInColorCell(_downHitInfo)) { handleAsDraggingColor(sender as ColorEdit, curve); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } else if (hitInRowIndicator(_downHitInfo)) { handleAsDraggingCurve(curve); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } }
/// <summary> /// Handles the MouseMove event of the grdViewUnsorted control. /// </summary> /// <param name="sender"> /// The source of the event. /// </param> /// <param name="e"> /// The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event data. /// </param> private void grdViewUnsorted_MouseMove(object sender, MouseEventArgs e) { var view = sender as GridView; if (e.Button == MouseButtons.Left && this.downHitInfo != null) { var dragSize = SystemInformation.DragSize; var dragRect = new Rectangle( new Point( this.downHitInfo.HitPoint.X - dragSize.Width / 2, this.downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize); if (!dragRect.Contains(new Point(e.X, e.Y))) { var notCatagorized = view.GetRow(this.downHitInfo.RowHandle) as ScanNotCatagorized; this.lblStatus.Text = string.Format("{0} selected.", notCatagorized.FilePath); view.GridControl.DoDragDrop(notCatagorized, DragDropEffects.Move); this.downHitInfo = null; DXMouseEventArgs.GetMouseArgs(e).Handled = true; } } }
bool IsCursorOnColumnButton(System.EventArgs e) { DXMouseEventArgs de = DXMouseEventArgs.GetMouseArgs(View.GridControl, e); object o = View.CalcHitInfo(de.Location); return(View.CalcHitInfo(de.Location).HitTest == GridHitTest.ColumnButton); }
private void OnMouseWheel(object sender, MouseEventArgs e) { if (!m_VScroll.Visible) { return; } //Control control = sender as Control;// NEW LINE //if (control.Bounds.Contains(e.Location)) return; //NEW LINE DXMouseEventArgs.GetMouseArgs(e).Handled = true; int scrollValue = m_VScroll.Value; if (e.Delta < 0) { int delta = m_VScroll.Value + m_VScroll.SmallChange; m_VScroll.Value = Math.Min(delta, m_VScroll.Maximum - m_VScroll.LargeChange + 1); } else if (scrollValue < m_VScroll.SmallChange) { m_VScroll.Value = 0; } else { m_VScroll.Value -= m_VScroll.SmallChange; } ScrollVertically(m_VScroll, new ScrollEventArgs(ScrollEventType.ThumbPosition, scrollValue, m_VScroll.Value, ScrollOrientation.VerticalScroll)); }
private void gvCustDes_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { GridView gv = gvCustDes; lblStatus.Text = "* Edit Destination"; lblStatus.ForeColor = Color.Red; chkShow = true; txeID.Text = gv.GetFocusedRowCellValue("ID").ToString(); slueCode.EditValue = gv.GetFocusedRowCellValue("CUSID").ToString(); txeCustCode.Text = gv.GetFocusedRowCellValue("Code").ToString(); txeDes.Text = gv.GetFocusedRowCellValue("DestinationCode").ToString(); txeShip.Text = gv.GetFocusedRowCellValue("ShipToName").ToString(); txeAddr1.Text = gv.GetFocusedRowCellValue("ShipToAddress1").ToString(); txeAddr2.Text = gv.GetFocusedRowCellValue("ShipToAddress2").ToString(); txeAddr3.Text = gv.GetFocusedRowCellValue("ShipToAddress3").ToString(); txeCountry.Text = gv.GetFocusedRowCellValue("Country").ToString(); txePostCode.Text = gv.GetFocusedRowCellValue("PostCode").ToString(); txeTelNo.Text = gv.GetFocusedRowCellValue("TelephoneNo").ToString(); txeFaxNo.Text = gv.GetFocusedRowCellValue("FaxNo").ToString(); string CreatedBy = gv.GetFocusedRowCellValue("CreatedBy").ToString() == null ? "" : gv.GetFocusedRowCellValue("CreatedBy").ToString(); glueCREATE.EditValue = CreatedBy; txeCDATE.Text = gv.GetFocusedRowCellValue("CreatedDate").ToString(); string UpdatedBy = gv.GetFocusedRowCellValue("UpdatedBy").ToString() == null ? "" : gv.GetFocusedRowCellValue("UpdatedBy").ToString(); glueUPDATE.EditValue = UpdatedBy; txeUDATE.Text = gv.GetFocusedRowCellValue("UpdatedDate").ToString(); } }
//fires the MouseActionPerformed event. private void OnMouseActionPerformed(DXMouseEventArgs e) { if (this.mouseActionPerformed != null) { this.mouseActionPerformed(this, e); } }
//Polls the mouse device and alerts the controls to any changes in its' status. private void ProcessMouseDevice() { try { this.mouse.Poll(); } catch (InputLostException) { //reacquire the mouse this.mouse.Acquire(); this.mouse.Poll(); this.previousMouseState = this.mouse.CurrentMouseState; } MouseState state = this.mouse.CurrentMouseState; DXMouseEventArgs clickArgs = GetClickEventData(state); DXMouseEventArgs moveArgs = GetMoveEventData(state); if (clickArgs != null) { OnMouseActionPerformed(clickArgs); } if (moveArgs != null) { OnMouseActionPerformed(moveArgs); } this.previousMouseState = this.mouse.CurrentMouseState; }
public virtual void TreeMouseMove(MouseEventArgs e) { if (_hitInfo == null) { return; } if (_hitInfo.Node == null) { return; } if (e.Button != MouseButtons.Left) { return; } if (mouseDidNotReallyMove(e, _hitInfo)) { return; } _dragDropInfo = new DragDropInfo(getSelectedTreeNodes()); try { _treeView.DoDragDrop(_dragDropInfo, DragDropEffects.Move); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } finally { _hitInfo = null; _dragDropInfo = null; } }
private void GV_Main_MouseDown(object sender, MouseEventArgs e) { GridHitInfo hitInfo = GV_Main.CalcHitInfo(e.Location); if (hitInfo == null || hitInfo.Column == null) { return; } if (hitInfo.InRowCell) { if (hitInfo.Column.RealColumnEdit is RepositoryItemCheckEdit) { GV_Main.FocusedColumn = hitInfo.Column; GV_Main.FocusedRowHandle = hitInfo.RowHandle; GV_Main.ShowEditor(); CheckEdit edit = GV_Main.ActiveEditor as CheckEdit; if (edit == null) { return; } edit.Toggle(); DXMouseEventArgs.GetMouseArgs(e).Handled = true; GV_Main.CloseEditor(); } } }
private void grvCategory_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { DataRow row = grvCategory.GetDataRow(info.RowHandle); Detail_Infor Detail_Infor = new Detail_Infor(); UI.Detail.uc_Detail_Category uc_Detail_Category = new UI.Detail.uc_Detail_Category(); int height = uc_Detail_Category.Size.Height; int width = uc_Detail_Category.Size.Width; //uc_List_Friend.List_Friend = Data_Friend; Detail_Infor.Size = new Size(width, height + 60); Detail_Infor.Str_Flag = Variable.detail_infor.Category; Detail_Infor.Data = row; //Detail_Infor._userId = _userId; Detail_Infor._user = _user; //Detail_Infor.ShowDialog(); DialogResult dialog_result = Detail_Infor.ShowDialog(); if (dialog_result == DialogResult.Cancel) { Load_Data(); } } }
private void gvPTerm_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { GridView gv = gvPTerm; lblStatus.Text = "* Edit Payment Term"; lblStatus.ForeColor = Color.Red; txeID.Text = gv.GetFocusedRowCellValue("No").ToString(); txeName.Text = gv.GetFocusedRowCellValue("Name").ToString(); txeDescription.Text = gv.GetFocusedRowCellValue("Description").ToString(); txeDueDate.Text = gv.GetFocusedRowCellValue("DuedateCalculation").ToString(); int status = -1; if (gv.GetFocusedRowCellValue("Status").ToString() != "") { status = Convert.ToInt32(gv.GetFocusedRowCellValue("Status").ToString()); } selectStatus(status); string CreatedBy = gv.GetFocusedRowCellValue("CreatedBy").ToString() == null ? "" : gv.GetFocusedRowCellValue("CreatedBy").ToString(); glueCREATE.EditValue = CreatedBy; txeDATE.Text = gv.GetFocusedRowCellValue("CreatedDate").ToString(); } }
protected override bool OnMouseWheel(MouseEventArgs e) { DXMouseEventArgs ee = DXMouseEventArgs.GetMouseArgs(e); //Copied from GridHandler source. //Originally called base.OnMouseWheel, which called View.RaiseMouseWheel. View.RaiseMouseWheel(ee); if (ee.Handled) { return(true); } try { if (View.AllowEditorMouseWheel && View.IsEditing) { return(false); } if (View.FilterPopup != null) { return(true); } View.TopRowIndex += (e.Delta > 0 ? -GetScrollLinesCount() : GetScrollLinesCount()); return(true); } finally { if (View != null && View.ScrollInfo != null && View.ScrollInfo.VScroll != null && View.ScrollInfo.VScroll.Visible) { ee.Handled = true; } } }
private void controlOnMouseMove(object sender, MouseEventArgs e) { if (Info.ProcessMouse(EventType.MouseMove, DXMouseEventArgs.GetMouseArgs(e))) { Invalidate(); } }
private void gvCalendar_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { GridView gv = gvCalendar; lblStatus.Text = "* Edit Calendar"; lblStatus.ForeColor = Color.Red; string strComType = gv.GetFocusedRowCellValue("CompanyType").ToString(); string strComName = gv.GetFocusedRowCellValue("CompanyNo").ToString(); string strWorkDay = gv.GetFocusedRowCellValue("WorkingPerWeek").ToString(); txteCalendarNo.EditValue = gv.GetFocusedRowCellValue("CalendarNo").ToString(); LoadHoliday(); speYEAR.Value = Convert.ToInt32(gv.GetFocusedRowCellValue("Year").ToString()); cbeComType.EditValue = strComType; cbeComName.EditValue = strComName; lueWorkDay.EditValue = strWorkDay; string CreatedBy = gv.GetFocusedRowCellValue("Created By").ToString() == null ? "" : gv.GetFocusedRowCellValue("Created By").ToString(); glueCREATE.EditValue = CreatedBy; txeDATE.EditValue = gv.GetFocusedRowCellValue("CreatedDate").ToString(); } }
private void GridView1_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { string colCaption = info.Column == null ? "N/A" : info.Column.Name; //MessageBox.Show(string.Format("DoubleClick on row: {0}, column: {1}.", info.RowHandle, colCaption)); var data = gridView1.GetRowCellValue(info.RowHandle, colCaption.ToUpper()).ToString(); if (!string.IsNullOrEmpty(data)) { var macuon = data.Split('-')[0].Trim(); Input frm = new Input(); frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); Add addfrm = new Add(this, true); var mc = addfrm.GetMaCuon(macuon); if (frm.DialogResult != DialogResult.Cancel) { RemoveMainGrid(mc.Macuon); AddToReturnGrid(mc, frm.duongkinh); SyncMainGrid(); } } } }
private void gridView1_MouseDown(object sender, MouseEventArgs e) { GridView view = sender as GridView; GridHitInfo hitInfo = view.CalcHitInfo(e.Location); if (hitInfo.InRowCell) { view.FocusedRowHandle = hitInfo.RowHandle; view.FocusedColumn = hitInfo.Column; DXMouseEventArgs.GetMouseArgs(e).Handled = true; if (e.Clicks == 2 && e.Button == System.Windows.Forms.MouseButtons.Left) { if (view.FocusedColumn == gridView1.Columns["MAHOADON"] || view.FocusedColumn == gridView1.Columns["TONGTIEN"] || view.FocusedColumn == gridView1.Columns["CHIETKHAU"] || view.FocusedColumn == gridView1.Columns["KHACHHANG"] || view.FocusedColumn == gridView1.Columns["THUNGAN"]) { } else { view.ShowEditor(); } } if (e.Clicks == 1) { btnXuat.Enabled = true; btnXuat.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; int[] selectedRowHandles = view.GetSelectedRows(); MaHD = view.GetRowCellValue(selectedRowHandles[0], "MAHOADON").ToString(); string maPT = busHD.GetMaPhieuTiemFromHD(MaHD); gridVC.DataSource = busPT.GetVCFromPHIEUTIEM(maPT); } } }
void InitEvents() { gridView.DoubleClick += (o, e) => { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = o as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { try { var row = gridView.GetFocusedRow() as dataResponse_Posts; if (row != null) { var data = Common.getPostDetailbyID(row.id); if (data != null) { frmSingleResult frm = new frmSingleResult(data); frm.ShowDialog(); } } } catch (Exception ex) { } } }; }
private void gvCustItem_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { GridView gv = gvCustItem; lblStatus.Text = "* Edit Item"; lblStatus.ForeColor = Color.Red; string Season = gv.GetFocusedRowCellValue("Season").ToString(); speSeason.Value = Convert.ToInt32(Regex.Match(Season, @"\d+([,\.]\d+)?").Value); glueSeason.EditValue = Season.Replace(Regex.Match(Season, @"\d+([,\.]\d+)?").Value, ""); slueCustomer.EditValue = gv.GetFocusedRowCellValue("OIDCUST").ToString(); slueStyle.EditValue = gv.GetFocusedRowCellValue("OIDSTYLE").ToString(); txeItemCode.Text = gv.GetFocusedRowCellValue("ItemCode").ToString(); txeItemName.Text = gv.GetFocusedRowCellValue("ItemName").ToString(); txeFabricWidth.Text = gv.GetFocusedRowCellValue("FabricWidth").ToString(); txeFBComposition.Text = gv.GetFocusedRowCellValue("FBComposition").ToString(); string StyleNo = gv.GetFocusedRowCellValue("StyleNo").ToString(); txeStyleNo.Text = Regex.Match(StyleNo, @"\d+([,\.]\d+)?").Value.ToString(); txeStyleCode.Text = StyleNo.Replace(Regex.Match(StyleNo, @"\d+([,\.]\d+)?").Value, ""); } }
private void grvKhachHang_DoubleClick(object sender, EventArgs e) { try { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { DataRow row = grvKhachHang.GetDataRow(info.RowHandle); int idCustomer = int.Parse(row["id"].ToString().Trim()); Detail_Infor Detail_Infor = new Detail_Infor(); Detail_Infor.Str_Flag = Variable.detail_infor.Customer; Detail_Infor.Data = row; Detail_Infor._user = _user; //Detail_Infor.ShowDialog(); DialogResult dialog_result = Detail_Infor.ShowDialog(); if (dialog_result == DialogResult.Cancel) { Load_Data(); } } } catch (Exception ex) { Util.Show_Message_Error(Message.msg_error, "Có lỗi xảy ra !!!"); } }
protected override bool OnMouseMove(MouseEventArgs ev) { DXMouseEventArgs e = DXMouseEventArgs.GetMouseArgs(ev); Point p = new Point(e.X, e.Y); UpdateQuickCustumisationIconState(p); return base.OnMouseMove(ev); }
private void gridView2_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { GridView view = sender as GridView; GridHitInfo hInfo = view.CalcHitInfo(e.X, e.Y); if (hInfo.InColumn) { GridViewInfo info = view.GetViewInfo() as GridViewInfo; int columnIndex = GetColumnIndex(info, hInfo.Column); for (int i = 0; i < info.ColumnsInfo[columnIndex].InnerElements.Count; i++) { if (info.ColumnsInfo[columnIndex].InnerElements[i].ElementInfo is DevExpress.Utils.Drawing.GlyphElementInfoArgs) { if (info.ColumnsInfo[columnIndex].InnerElements[i].ElementInfo.Bounds.Contains(e.X, e.Y)) { if (Convert.ToInt32(hInfo.Column.Tag) == 0) { hInfo.Column.ImageIndex = 1; hInfo.Column.Tag = 1; this.pmCheckAll(view, hInfo.Column, true); } else { hInfo.Column.ImageIndex = 0; hInfo.Column.Tag = 0; this.pmCheckAll(view, hInfo.Column, false); } DXMouseEventArgs.GetMouseArgs(e).Handled = true; } } } } }
public override void OnMouseMove(MouseEventArgs ev) { var e = DXMouseEventArgs.GetMouseArgs(ev); var p = new Point(e.X, e.Y); UpdateQuickCustumisationIconState(p); base.OnMouseMove(ev); }
protected override bool OnMouseUp(MouseEventArgs e) { bool result = base.OnMouseUp(e); DXMouseEventArgs ee = DXMouseEventArgs.GetMouseArgs(e); BaseTabPageViewInfoDescendant infodes = ViewInfo.SelectedTabPageViewInfo as BaseTabPageViewInfoDescendant; infodes.PagePanel.ProcessEvent(new ProcessEventEventArgs(EventType.MouseUp, ee)); return(result); }
private void controlOnMouseEnter(object sender, EventArgs e) { var ee = DXMouseEventArgs.GetMouseArgs(control, e); if (Info.ProcessMouse(EventType.MouseEnter, ee)) { Invalidate(); } }
void ActiveEditor_MouseWheel(object sender, MouseEventArgs e) { if (!AllowEditorMouseWheel) { DXMouseEventArgs ee = DXMouseEventArgs.GetMouseArgs(e); this.Handler.ProcessMouseWheel(ee); ee.Handled = true; } }
private void gvDanhsachPhieuDP_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridHitInfo info = gvDanhsachPhieuDP.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { PhieuDatPhongMoi pdp = new PhieuDatPhongMoi(); pdp.StartPosition = FormStartPosition.CenterScreen; pdp.txtSo.Text = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[0]).ToString(); pdp.dateCheckin.EditValue = Convert.ToDateTime(gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[4])).ToShortDateString(); pdp.dateCheckout.EditValue = Convert.ToDateTime(gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[5])).ToShortDateString(); pdp.dateNgay.EditValue = Convert.ToDateTime(gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[1])).ToShortDateString(); pdp.spSoKhach.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[13]).ToString(); pdp.spinPhong.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[14]).ToString(); pdp.edtDienThoai.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[18]).ToString(); pdp.tbNoidung.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[15]).ToString(); pdp.tbDattruoc.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[8]).ToString(); pdp.tbSoTK.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[11]).ToString(); pdp.tbTygia.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[16]).ToString(); pdp.glueNganhang.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[10]).ToString(); pdp.dtDattruoc.EditValue = Convert.ToDateTime(gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[6])).ToShortDateString(); pdp.cbHinhthuc.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[17]).ToString(); pdp.cbxLoai.EditValue = gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[9]).ToString(); var khach = db.Khach.ToList(); foreach (var item in khach) { if (item.HoTen == gvDanhsachPhieuDP.GetRowCellValue(gvDanhsachPhieuDP.FocusedRowHandle, gvDanhsachPhieuDP.Columns[2]).ToString()) { pdp.glueDoitac.EditValue = item.Id; } } var listroom = (from dkp in db.DangKyPhong from dk in db.Dangky where dkp.IDDK == dk.Id select new { dkp.SoPhong, dkp.IDDK }).ToList(); BindingList <Room> room = new BindingList <Room>(); foreach (var item in listroom) { if (item.IDDK == Convert.ToInt32(pdp.txtSo.Text)) { var list = (from r in db.Rooms where item.SoPhong == r.Sophong select new { r.Sophong, r.Sogiuong, r.Songuoi, r.Giaphong }).First(); room.Add(new Room() { Sophong = list.Sophong, Sogiuong = list.Sogiuong, Songuoi = list.Songuoi, Giaphong = list.Giaphong }); } } pdp.gcDangky.DataSource = room; pdp.p = 1; pdp.t = 1; pdp.ShowDialog(); DanhSachPhieuDP_Load(sender, e); } }
GridColumn GetColumn(DXMouseEventArgs args) { GridHitInfo info = gridView.CalcHitInfo(args.Location); if (info.InColumnPanel) { return(info.Column); } return(null); }
void view_MouseUp(object sender, MouseEventArgs e) { bool inSelectedCell = GetInSelectedCell(e); if (inSelectedCell) { DXMouseEventArgs.GetMouseArgs(e).Handled = true; view.ShowEditorByMouse(); } }
private void GridView1_DoubleClick(object sender, EventArgs e) { DXMouseEventArgs ea = e as DXMouseEventArgs; GridView view = sender as GridView; GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRow || info.InRowCell) { Valores(); } }
internal void ProcessMouseWheel(DXMouseEventArgs ee) { OnMouseWheel(ee); }
internal void OnEditorMouseWheel(DXMouseEventArgs e) { ScrollBy(-SystemInformation.MouseWheelScrollLines * Math.Sign(e.Delta)); e.Handled = true; //If the user turns the scroll wheel over a row, the row should be hovered. if (!isKeyDown) HoverByPoint(PointToClient(MousePosition)); //e.Location is relative to the editor }