Esempio n. 1
0
 private void _radGridView_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     if (e.Cell.Column.UniqueName == "Name")
     {
         ToolTipService.SetToolTip(e.Cell, "Editing the Name may cause changes in the database");
     }
 }
Esempio n. 2
0
 void gvwBooking_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     Booking rowData = e.Row.Item as Booking;
     //if (rowData.NullableRecordId != null && e.Cell.Column.UniqueName == "DaymarkerType")
     //{
     //    e.Cancel = true;
     //}
 }
 private void AssociatedObjectOnBeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     e.Cancel = false;
     if (CanCancel != null)
     {
         e.Cancel = CanCancel();
     }
 }
Esempio n. 4
0
        private void GridView_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            ColumnsDateTimeMulti col = e.Cell.Column as ColumnsDateTimeMulti;

            if (col.DisplayDate < DateTime.Now)
            {
                e.Cancel = true;
            }
        }
Esempio n. 5
0
        //Logic

        private void TaskBoardRadGridViewBeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            if (e == null) throw new ArgumentNullException("e");
            if (!(e.Cell.ParentRow.Item is RouteTask))
            {
                e.Cancel = true;
                e.Cell.IsInEditMode = false;
            }
        }
        private void gvDetails_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            var parentRow   = e.Row.GridViewDataControl.ParentRow;
            var subcontract = (BillProductExchangeSearchEntity)parentRow.DataContext;

            if (subcontract.IsDeleted)
            {
                MessageBox.Show("已作废单据不能修改!");
                e.Cancel = true;
            }
        }
Esempio n. 7
0
        private void gvDetails_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            var parentRow = e.Row.GridViewDataControl.ParentRow;
            var order     = (OrderSearchEntity)parentRow.DataContext;

            if (!order.订单状态)
            {
                MessageBox.Show("已作废订单不能修改!");
                e.Cancel = true;
            }
        }
 void radDanhSachLichPhat_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     if (!LObject.IsNullOrEmpty(e.Cell.Column.UniqueName) & e.Cell.Column.UniqueName.Contains("THANG"))
     {
         ColumnsDateTimeMulti col = e.Cell.Column as ColumnsDateTimeMulti;
         if (col.DisplayDate < ClientInformation.NgayLamViecHienTai.StringToDate(ApplicationConstant.defaultDateTimeFormat))
         {
             e.Cancel = true;
         }
     }
 }
 /// <summary>
 /// Beginnig Edit Event
 /// </summary>
 public void dgFairValueComposition_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     if (e.Cell.DataColumn.UniqueName == "Source")
     {
         RadComboBox cbSourcecontrol = e.Cell.DataColumn.CellTemplate.FindChildByType <RadComboBox>();
     }
     if (e.Cell.DataColumn.UniqueName == "Sell")
     {
         e.Cell.Value = "";
     }
 }
Esempio n. 10
0
        private void CellBeginEditHisto(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            DataRow row = HistoGrid.SelectedItem as DataRow;

            if (row == null)
            {
                return;
            }

            _prevDateSelected = row["Date"].ToString();
            _prevTypeSelected = row["type"].ToString();
        }
Esempio n. 11
0
 private void AssociatedObject_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     if (e.Row != null)
     {
         var dataContext = e.Row.DataContext;
         if (Command != null && Command.CanExecute(dataContext))
         {
             Command.Execute(dataContext);
         }
     }
     e.Cancel = true;
 }
Esempio n. 12
0
 private void raddgrThongTinLapLich_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     if (!e.Cell.Column.UniqueName.IsNullOrEmptyOrSpace())
     {
         if (e.Cell.Column.UniqueName.Equals("NGAY_BDAU"))
         {
             lstNgayDauKy = new List <AutoCompleteEntry>();
             foreach (string str in _TDVMKHEUOC.DSACH_NGAY_DKY)
             {
                 lstNgayDauKy.Add(new AutoCompleteEntry(LDateTime.StringToDate(str, ApplicationConstant.defaultDateTimeFormat).ToShortDateString(), str, ""));
             }
             ucColNgayBDau.GiaTri      = LDateTime.DateToString(Convert.ToDateTime(e.Cell.Value), ApplicationConstant.defaultDateTimeFormat);
             ucColNgayBDau.lstComboBox = lstNgayDauKy;
         }
     }
 }
 /// <summary>
 /// Before Editing Begins
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgDCFAnalysisSummary_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     if ((e.Row.DataContext as DCFDisplayData).PropertyName == "Stock Specific Discount")
     {
         e.Cell.Value = "";
     }
     else
     {
         e.Cancel = true;
     }
     //int Index = this.dgDCFAnalysisSummary.Items.IndexOf(e.Cell.ParentRow.Item);
     //if (Index != 3)
     //{
     //    e.Cancel = true;
     //}
     //else
     //{
     //    e.Cell.Value = "";
     //}
 }
 /// <summary>
 /// DataGrid -Row Edit beginning Event
 /// </summary>
 /// <param name="sender">Sender of the event</param>
 /// <param name="e">Event Arguement</param>
 private void dgDCFSummary_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     if ((e.Row.DataContext as DCFDisplayData).PropertyName == "(-) FV of Minorities")
     {
         e.Cell.Value = "";
     }
     else
     {
         e.Cancel = true;
     }
     //int Index = this.dgDCFSummary.Items.IndexOf(e.Cell.ParentRow.Item);
     //if (Index != 6)
     //{
     //    e.Cancel = true;
     //}
     //else
     //{
     //    e.Cell.Value = "";
     //}
 }
Esempio n. 15
0
 void gvwBooking_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     Booking rowData = e.Row.Item as Booking;
     //if (rowData.NullableRecordId != null && e.Cell.Column.UniqueName == "DaymarkerType")
     //{
     //    e.Cancel = true;
     //}
 }
 void RadGridView_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     this.CommandRow.Template = this.EditCommandTemplate;
 }
Esempio n. 17
0
 private void _radGridView_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e){
     if (e.Cell.Column.UniqueName == "Name"){
         ToolTipService.SetToolTip(e.Cell, "Editing the Name may cause changes in the database");
     }
 }
Esempio n. 18
0
 private void gridView_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
 {
     e.Cancel = true;
 }