Exemplo n.º 1
0
        private void item_ProductDataGrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
        {
            Logistic _item_product         = (((DataGrid)sender).SelectedItem) as Logistic;
            int      id_product            = _item_product._id_item;
            DataGrid item_movementDataGrid = e.DetailsElement as DataGrid;
            var      movement =
                (from items in ProjectTaskDB.items

                 join item_product in ProjectTaskDB.item_product on items.id_item equals item_product.id_item
                 into its
                 from p in its
                 join item_movement in ProjectTaskDB.item_movement on p.id_item_product equals item_movement.id_item_product
                 into IMS
                 from a in IMS
                 join AM in ProjectTaskDB.app_branch on a.app_location.id_branch equals AM.id_branch
                 where a.status == Status.Stock.InStock && a.item_product.id_item == id_product

                 group a by new { a.item_product }
                 into last
                 select new
            {
                code = last.Key.item_product.item.code,
                name = last.Key.item_product.item.name,
                BranchName = last.OrderBy(m => m.app_location.id_branch),
                itemid = last.Key.item_product.item.id_item,
                quntitiy = last.Sum(x => x.credit) - last.Sum(x => x.debit),
                measurement = last.Key.item_product.item.id_measurement
            }).ToList();

            item_movementDataGrid.ItemsSource = movement;
        }
Exemplo n.º 2
0
        private void SupplierDataGrid_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
        {
            if (CurrentSelectedItem != e.Row.Item)
            {
                CurrentSelectedItem = e.Row.Item as DataItem;
                var asd             = e.DetailsElement as Grid;
                var packsize        = FindVisualChild <StackPanel>(asd);
                var DeliveryNoteBox = FindVisualChild <TextBox>(asd);

                var Model1 = FindVisualChild <PlotView>(asd);
                try
                {
                    Model1.Model         = (e.Row.Item as DataItem).SalesGraph;
                    DeliveryNoteBox.Text = (e.Row.Item as DataItem).SkuData.DeliveryNote;
                }
                catch (Exception exception)
                {
                    Model1.Visibility = Visibility.Collapsed;
                    Console.WriteLine(exception);
                }

                CurrentSelectedPacksizes.Clear();
                packsize.Children.Add(new Packsizes(CurrentSelectedItem.Children, CurrentSelectedItem));

                // foreach (DataItemDetails Pack in (e.Row.Item as DataItem).Packsizes)
                // {
                //    CurrentSelectedPacksizes.Add(Pack);
                // }
            }
        }
Exemplo n.º 3
0
        private void objDatagrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
        {
            var objInnerDataGrid = e.DetailsElement.FindName("objInnerDatagrid") as DataGrid;
            var cmbActivity      = objInnerDataGrid.FindName("cmbActivity") as DataGridComboBoxColumn;

            cmbActivity.ItemsSource = DataViewActivity;
        }
Exemplo n.º 4
0
        private void DataGridRowClicked(object sender, DataGridRowDetailsEventArgs e)
        {
            var alternativesList    = (IList <Alternative>)((DataGrid)sender).ItemsSource;
            var selectedAlternative = (Alternative)e.Row.Item;

            _lastDataGridSelectedItem = alternativesList.IndexOf(selectedAlternative);
        }
Exemplo n.º 5
0
        private void sales_orderDatagrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
        {
            sales_order _sales_order  = ((System.Windows.Controls.DataGrid)sender).SelectedItem as sales_order;
            int         id_salesOrder = _sales_order.id_sales_order;

            Task task_PrimaryData = Task.Factory.StartNew(() => LoadOrderDetail(id_salesOrder, e));
        }
Exemplo n.º 6
0
 private void lvAccounts_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
 {
     if (e.Row.DetailsVisibility == Visibility.Visible && e.Row.DataContext is Account account)
     {
         account.Phone = new ObservableCollection <string>(Data.GetPhones(account.Id));
     }
 }
Exemplo n.º 7
0
 private void LoadOrderDetail(int id, DataGridRowDetailsEventArgs e)
 {
     if (_entity.sales_order_detail.Count() > 0)
     {
         var salesOrder = (from sales_order_detail in _entity.sales_order_detail
                           where sales_order_detail.id_sales_order == id
                           join sales_invoice_detail in _entity.sales_invoice_detail
                           on sales_order_detail.id_sales_order_detail equals sales_invoice_detail.id_sales_order_detail into lst
                           from list in lst.DefaultIfEmpty()
                           group list by new
         {
             sales_order_detail = sales_order_detail,
         }
                           into grouped
                           select new
         {
             id = grouped.Key.sales_order_detail.id_sales_order_detail,
             name = grouped.Key.sales_order_detail.item.name,
             quantity = grouped.Key.sales_order_detail.quantity != null ? grouped.Key.sales_order_detail.quantity : 0,
             balance = grouped.Key.sales_order_detail.quantity != null ? grouped.Key.sales_order_detail.quantity : 0 - grouped.Sum(x => x.quantity != null ? x.quantity : 0),
         }).ToList().Where(x => x.balance > 0).ToList();
         Dispatcher.Invoke(new Action(() =>
         {
             System.Windows.Controls.DataGrid RowDataGrid = e.DetailsElement as System.Windows.Controls.DataGrid;
             RowDataGrid.ItemsSource = salesOrder;
         }));
     }
 }
Exemplo n.º 8
0
        private void ChildrenGridRowDetailsVis(object sender, DataGridRowDetailsEventArgs e)
        {
            var children = CurrentStats?.Children;

            if (e.Row.Item is PlayerStats stats && e.DetailsElement is DataGrid childrenDataGrid && children != null && children.ContainsKey(stats.Name))
            {
                if (childrenDataGrid.ItemsSource != children[stats.Name])
                {
                    childrenDataGrid.ItemsSource = children[stats.Name];
                    ChildGrids.Add(childrenDataGrid);

                    // show bane column if needed
                    if (dataGrid.Columns[4].Visibility == Visibility.Visible)
                    {
                        childrenDataGrid.Columns[4].Visibility = Visibility.Visible;
                    }

                    // fix column widths
                    foreach (var column in dataGrid.Columns)
                    {
                        childrenDataGrid.Columns[column.DisplayIndex].Width = column.ActualWidth;
                    }
                }
            }
        }
Exemplo n.º 9
0
        private void sales_orderDatagrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
        {
            sales_budget _sales_budget   = ((DataGrid)sender).SelectedItem as sales_budget;
            int          id_sales_budget = _sales_budget.id_sales_budget;
            DataGrid     RowDataGrid     = e.DetailsElement as DataGrid;


            var salesBudget = (from sales_budget_detail in db.sales_budget_detail
                               where sales_budget_detail.id_sales_budget == id_sales_budget &&
                               sales_budget_detail.sales_budget.status == Status.Documents_General.Approved
                               join sales_order_detail in db.sales_order_detail
                               on sales_budget_detail.id_sales_budget_detail equals sales_order_detail.id_sales_order_detail into lst
                               from list in lst.DefaultIfEmpty()
                               group list by new
            {
                sales_budget_detail = sales_budget_detail,
            }
                               into grouped
                               select new
            {
                item = grouped.Key.sales_budget_detail.item_description,
                unitprice = grouped.Key.sales_budget_detail.unit_price > 0 ? grouped.Key.sales_budget_detail.unit_price : 0,
                balance = grouped.Key.sales_budget_detail.quantity > 0 ? grouped.Key.sales_budget_detail.quantity : 0 - grouped.Sum(x => x.quantity > 0 ? x.quantity : 0),
            }).ToList();

            RowDataGrid.ItemsSource = salesBudget;
        }
Exemplo n.º 10
0
 private void gridViewData_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
 {
     try
     {
         if (e.Row.DetailsVisibility == System.Windows.Visibility.Visible)
         {
             var      item       = e.Row.Item;
             Type     type       = item.GetType();
             int      employeeId = (int)type.GetProperty("EmployeeId").GetValue(item, null);
             DataGrid dataGrid   = e.DetailsElement as DataGrid;
             using (ERPEF context = new ERPEF())
             {
                 IQueryable <FamilyRelation> relations = context.FamilyRelations
                                                         .Where(n => n.EmployeeId == employeeId);
                 if (relations.Count() > 0)
                 {
                     dataGrid.ItemsSource = relations.ToList();
                 }
                 else
                 {
                     dataGrid.Visibility = Visibility.Hidden;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void DataGridVersion_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
 {
     if (DataGridVersion.SelectedItem is ListVersion listVersion)
     {
         e.DetailsElement.Visibility = listVersion.CommentIsFilled ? Visibility.Visible : Visibility.Collapsed;
     }
 }
Exemplo n.º 12
0
        void DtGrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
        {
            T_HR_CUSTOMGUERDONRECORD sr          = e.Row.DataContext as T_HR_CUSTOMGUERDONRECORD;
            SalaryContrast           getdgdetail = Utility.FindChildControl <SalaryContrast>(DtGrid, "dgdetail");

            if (sr.EMPLOYEEID != string.Empty && sr.SALARYYEAR != string.Empty && sr.SALARYMONTH != string.Empty)
            {
                string months = sr.SALARYMONTH;
                string years  = sr.SALARYYEAR;
                if (sr.SALARYMONTH == "1")
                {
                    years  = (Convert.ToInt32(years) - 1).ToString();
                    months = "12";
                }
                else
                {
                    months = (Convert.ToInt32(months) - 1).ToString();
                }
                getdgdetail.FlashData(sr.EMPLOYEEID, years, months, SalaryGenerateType.CustomSalaryRecord);
            }
            else
            {
                getdgdetail.Visibility = Visibility.Collapsed;
            }
        }
Exemplo n.º 13
0
        private void DataGridRowClicked(object sender, DataGridRowDetailsEventArgs e)
        {
            var criteriaList      = (IList <Criterion>)((DataGrid)sender).ItemsSource;
            var selectedCriterion = (Criterion)e.Row.Item;

            _lastDataGridSelectedItem = criteriaList.IndexOf(selectedCriterion);
        }
Exemplo n.º 14
0
        private void CtrlDataGrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
        {
            StackPanel panel = e.DetailsElement as StackPanel;
            Grid       grid  = panel.Children.ElementAt(0) as Grid;

            DataGrid innerGrid = panel.FindName("ctrUserRow") as DataGrid;
            //innerGrid.ItemsSource = Globals._usersData["IBAILA"].Actions;
        }
Exemplo n.º 15
0
 private void sales_orderDatagrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
 {
     if (_entity.purchase_order_detail.Count() > 0)
     {
         purchase_order _purchase_order  = ((System.Windows.Controls.DataGrid)sender).SelectedItem as purchase_order;
         Task           task_PrimaryData = Task.Factory.StartNew(() => LoadOrderDetail(_purchase_order, e));
     }
 }
Exemplo n.º 16
0
        private void DetailsEvent(object sender, DataGridRowDetailsEventArgs e)
        {
            var news = (Inside_MMA.Models.News)e.Row.Item;

            //if (news.NewsBody == null)
            TXmlConnector.ConnectorSendCommand(
                $"<command id=\"get_news_body\" news_id=\"{news.Id}\"/>");
        }
        /// <summary>
        /// TODO
        /// </summary>
        private void DGrid_OnLoadingRowDetails(object?sender, DataGridRowDetailsEventArgs e)
        {
            ElementTemplate element = e.Row.Item as ElementTemplate;

            if (element.MadeOf == null)
            {
                e.Row.DetailsVisibility = Visibility.Collapsed;
            }
        }
Exemplo n.º 18
0
        //private DataGridCellInfo currCell;
        //public DataGridCellInfo CurrCell {
        //    get {
        //        return currCell;
        //    }
        //    set {
        //        currCell = value;
        //        if (value.Column != null) {
        //            this.CurrOrder = value.Item as Order;
        //        }
        //    }
        //}

        public void LoadingRowDetails(DataGridRowDetailsEventArgs e)
        {
            try {
                var cnt = e.DetailsElement.FindName("cnt") as ContentControl;
                var vm  = new OrderDetailViewModel((e.Row.DataContext as Order));
                View.SetModel(cnt, vm);
            } catch {
            }
        }
Exemplo n.º 19
0
        public void ShowDetailVM(Order order, DataGridRowDetailsEventArgs eventArgs)
        {
            var ctrl  = (ContentControl)eventArgs.DetailsElement.FindName("detailView");
            var view  = new OrderDetailView();
            var model = new OrderDetailViewModel(order);

            ViewModelBinder.Bind(model, view, null);
            ctrl.Content = view;
        }
        //Відображення вкладених даних(повідомлень) для таблиці Тем
        private void TopicsTable_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
        {
            var current_topic = e.Row.Item as Topic;
            var messages      = (DataGrid)e.DetailsElement;

            if (messages.ItemsSource == null && e.Row.IsVisible)
            {
                messages.ItemsSource = current_topic.Messages; // прив'язатись до повідомлень з поточною темою
            }
        }
 private void DataGrid_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
 {
     if (e.Row.DetailsVisibility == Visibility.Visible)
     {
         User   user   = Manager.Instance.Users.First(u => u.UserId == (e.Row.Item as Reservation).ClientId);
         Driver driver = Manager.Instance.Drivers.First(d => d.DriverId == (e.Row.Item as Reservation).ReservationDriverId);
         (this.DataContext as ReservationViewModel).SetClient(user);
         (this.DataContext as ReservationViewModel).SetDriver(driver);
     }
 }
Exemplo n.º 22
0
 private void sales_invocieDatagrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
 {
     if (_entity.sales_invoice_detail.Count() > 0)
     {
         sales_invoice _sales_invoice                 = ((System.Windows.Controls.DataGrid)sender).SelectedItem as sales_invoice;
         int           id_purchase_invoice            = _sales_invoice.id_sales_invoice;
         System.Windows.Controls.DataGrid RowDataGrid = e.DetailsElement as System.Windows.Controls.DataGrid;
         var salesInvoice = _sales_invoice.sales_invoice_detail;
         RowDataGrid.ItemsSource = salesInvoice;
     }
 }
Exemplo n.º 23
0
        private void GridTaxOfficesRowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
        {
            var gridUsers = (DataGrid)e.DetailsElement;

            if (e.Row.Visibility != Visibility.Visible || gridUsers.ItemsSource != null)
            {
                return;
            }
            iTRAACHelpers.WpfDataGridStandardBehavior(gridUsers);
            //whack:gridUsers.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(gridUsers_MouseLeftButtonDown);
            gridUsers.ItemsSource = TaxOfficeModel.OfficeUsers(e.Row.DataContext);
        }
Exemplo n.º 24
0
        private void NotificationView_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
        {
            Notification notification = NotificationView.SelectedValue as Notification;

            if (notification != null && String.IsNullOrEmpty(notification.Message))
            {
                e.DetailsElement.Visibility = Visibility.Collapsed;
            }
            else
            {
                e.DetailsElement.Visibility = Visibility.Visible;
            }
        }
Exemplo n.º 25
0
 private void PurchasesDataGrid_OnRowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
 {
     if (PurchasesDataGrid.SelectedItem == null)
     {
         return;
     }
     if (((Purchase)PurchasesDataGrid.SelectedItem).PurchaseItems.Count > 0)
     {
         return;
     }
     _purchaseHandler.LoadPurchaseItems((Purchase)PurchasesDataGrid.SelectedItem);
     PurchasesDataGrid.Items.Refresh();
 }
Exemplo n.º 26
0
        private async void dg_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
        {
            if (e.Row.DetailsVisibility == Visibility.Visible)
            {
                DataGrid  innerDataGrid = e.DetailsElement.FindName("dg2") as DataGrid;
                DataTable dt            = await BaseDataBase._TablingStoredProcedureAsync("GetInventoryItemStaDetailsAll",
                                                                                          new SqlParameter("@ItemID", (e.Row.Item as DataRowView)["ItemID"]),
                                                                                          new SqlParameter("@date1", date1.SelectedDate ?? new DateTime(2000, 1, 1)),
                                                                                          new SqlParameter("@date2", date2.SelectedDate ?? new DateTime(2050, 1, 1)));

                innerDataGrid.ItemsSource = dt.DefaultView;
            }
        }
Exemplo n.º 27
0
        private void ChildrenGridRowDetailsVis(object sender, DataGridRowDetailsEventArgs e)
        {
            var children = CurrentStats?.Children;

            if (e.Row.Item is PlayerStats stats && e.DetailsElement is DataGrid childrenDataGrid && children != null && children.ContainsKey(stats.Name))
            {
                // initialize data one time
                if (childrenDataGrid.ItemsSource != children[stats.Name])
                {
                    childrenDataGrid.ItemsSource = children[stats.Name];
                    ChildGrids.Add(childrenDataGrid);

                    // fix column widths and hidden values
                    for (int i = 0; i < dataGrid.Columns.Count; i++)
                    {
                        var column      = dataGrid.Columns[i];
                        var childColumn = childrenDataGrid.Columns[i];

                        if (childColumn.Width != column.ActualWidth)
                        {
                            childColumn.Width = column.ActualWidth;
                        }

                        if (childColumn.DisplayIndex != column.DisplayIndex)
                        {
                            childColumn.DisplayIndex = column.DisplayIndex;
                        }

                        if (TheShownColumns != null && TheShownColumns.Count > 0)
                        {
                            // never let users hide the first two columns
                            if (i > 1)
                            {
                                var vis = TheShownColumns.ContainsKey(column.Header as string) ? Visibility.Visible : Visibility.Hidden;
                                if (vis != childColumn.Visibility)
                                {
                                    childColumn.Visibility = vis;
                                }
                            }
                        }
                        else
                        {
                            if (childColumn.Visibility != dataGrid.Columns[i].Visibility)
                            {
                                childColumn.Visibility = dataGrid.Columns[i].Visibility;
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 28
0
 private void LoadOrderDetail(purchase_order purchase_order, DataGridRowDetailsEventArgs e)
 {
     if (_entity.purchase_order_detail.Count() > 0)
     {
         Dispatcher.Invoke(new Action(() =>
         {
             System.Windows.Controls.DataGrid RowDataGrid = e.DetailsElement as System.Windows.Controls.DataGrid;
             if (RowDataGrid != null)
             {
                 RowDataGrid.ItemsSource = purchase_order.purchase_order_detail;
             }
         }));
     }
 }
Exemplo n.º 29
0
        void DtGrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
        {
            DataGrid gridDetails         = e.DetailsElement as DataGrid;
            T_HR_EMPLOYEESALARYRECORD sr = e.Row.DataContext as T_HR_EMPLOYEESALARYRECORD;

            if (sr.EMPLOYEEID != string.Empty && sr.SALARYYEAR != string.Empty && sr.SALARYMONTH != string.Empty)
            {
                string months = sr.SALARYMONTH;
                string years  = sr.SALARYYEAR;
                if (sr.SALARYMONTH == "1")
                {
                    years  = (Convert.ToInt32(years) - 1).ToString();
                    months = "12";
                }
                else
                {
                    months = (Convert.ToInt32(months) - 1).ToString();
                }
                SalaryServiceClient clienttemp = new SalaryServiceClient();
                clienttemp.GetSalaryRecordOneCompleted += (o, ev) =>
                {
                    if (ev.Error == null)
                    {
                        if (ev.Result != null)
                        {
                            List <T_HR_EMPLOYEESALARYRECORD> salaryrecordlast = new List <T_HR_EMPLOYEESALARYRECORD>();
                            salaryrecordlast.Add(ev.Result);
                            gridDetails.ItemsSource = salaryrecordlast;
                            gridDetails.Visibility  = Visibility.Visible;
                        }
                        else
                        {
                            gridDetails.Visibility = Visibility.Collapsed;
                        }
                    }
                    else
                    {
                        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
                                                       Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                        //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ev.Error.Message));
                    }
                };
                clienttemp.GetSalaryRecordOneAsync(sr.EMPLOYEEID, years, months);
            }
            else
            {
                gridDetails.Visibility = Visibility.Collapsed;
            }
        }
Exemplo n.º 30
0
        private void item_ProductDataGrid_LoadingRowDetails(object sender, DataGridRowDetailsEventArgs e)
        {
            DataGrid DataGrid           = (DataGrid)sender;
            production_order_detail obj = (production_order_detail)DataGrid.SelectedItem;

            if (obj != null)
            {
                if (obj.project_task != null)
                {
                    int _id_task = obj.project_task.id_project_task;
                    project_task_dimensionViewSource        = (CollectionViewSource)FindResource("project_task_dimensionViewSource");
                    project_task_dimensionViewSource.Source = OrderDB.project_task_dimension.Where(x => x.id_project_task == _id_task).ToList();
                }
            }
        }
Exemplo n.º 31
0
        private void gridCategories_LoadedRowDetailsPresenter(object sender, DataGridRowDetailsEventArgs e)
        {
            if (e.Row.DetailsVisibility == Visibility.Visible)
            {
                var detailGrid = e.DetailsElement as C1DataGrid;

                if (detailGrid != null)
                {
                    detailGrid.Tag = e.Row;//Save the parent row to be used in the navigation.

                    if (detailGrid.ItemsSource == null)
                    {
                        int subcategory = (e.Row.DataItem as Subcategory).ProductSubcategoryID;
                        detailGrid.ItemsSource = Data.GetProducts((product) => product.Element("ProductSubcategoryID") != null && !string.IsNullOrWhiteSpace(product.Element("ProductSubcategoryID").Value) && int.Parse(product.Element("ProductSubcategoryID").Value) == subcategory).Take(10);
                    }
                }
            }
        }
Exemplo n.º 32
0
        /// <summary>
        ///     Notifies the DataGrid that the visibility is changed.  This is intended to be Invoked at lower than Layout priority to give the template time to expand.
        /// </summary>
        private static object DelayedRowDetailsVisibilityChanged(object arg)
        {
            var row = (DataGridRow)arg;
            var dataGrid = row.DataGridOwner;
            var detailsElement = row.DetailsPresenter != null ? row.DetailsPresenter.DetailsElement : null;
            if (dataGrid != null)
            {
                var detailsEventArgs = new DataGridRowDetailsEventArgs(row, detailsElement);
                dataGrid.OnRowDetailsVisibilityChanged(detailsEventArgs);
            }

            return null;
        }
Exemplo n.º 33
0
        /// <summary>
        ///     Invokes the RowDetailsVisibilityChanged event
        /// </summary>
        protected internal virtual void OnRowDetailsVisibilityChanged(DataGridRowDetailsEventArgs e)
        {
            if (RowDetailsVisibilityChanged != null)
            {
                RowDetailsVisibilityChanged(this, e);
            }

            var row = e.Row;

            // Don't fire LoadingRowDetails it's disabled or already loaded.
            if (row.DetailsEventStatus == DataGridRow.RowDetailsEventStatus.Pending && row.DetailsVisibility == Visibility.Visible && row.DetailsPresenter != null)
            {
                // No need to used DelayedOnLoadingRowDetails because OnRowDetailsVisibilityChanged isn't called until after the
                // template is expanded.
                OnLoadingRowDetails(new DataGridRowDetailsEventArgs(row, row.DetailsPresenter.DetailsElement));
            }
        }
Exemplo n.º 34
0
 /// <summary>
 ///     Invokes the LoadingRowDetails event
 /// </summary>
 protected virtual void OnLoadingRowDetails(DataGridRowDetailsEventArgs e)
 {
     e.Row.DetailsEventStatus = DataGridRow.RowDetailsEventStatus.Loaded;
     if (LoadingRowDetails != null)
     {
         LoadingRowDetails(this, e);
     }
 }
Exemplo n.º 35
0
 /// <summary> 
 /// Raises the PreparingRowDetails for row details preparation 
 /// </summary>
 protected virtual void OnPreparingRowDetails(DataGridRowDetailsEventArgs e) 
 {
     EventHandler<DataGridRowDetailsEventArgs> handler = this.PreparingRowDetails;
     if (handler != null) 
     {
         handler(this, e);
     } 
 } 
Exemplo n.º 36
0
        /// <summary>
        ///     Invokes the RowDetailsVisibilityChanged event
        /// </summary>
        protected internal virtual void OnRowDetailsVisibilityChanged(DataGridRowDetailsEventArgs e)
        {
            if (RowDetailsVisibilityChanged != null)
            {
                RowDetailsVisibilityChanged(this, e);
            }

            var row = e.Row;

            // LoadingRowDetails only needs to be called when row.DetailsVisibility == Visibility.Visible.
            // OnLoadingRowDetailsWrapper already makes this check, so we omit it here.
            //
            // No need to used DelayedOnLoadingRowDetails because OnRowDetailsVisibilityChanged isn't called until after the
            // template is expanded.
            OnLoadingRowDetailsWrapper(row);
        }
Exemplo n.º 37
0
 /// <summary>
 ///     Invokes the UnloadingRowDetails event
 /// </summary>
 protected virtual void OnUnloadingRowDetails(DataGridRowDetailsEventArgs e)
 {
     if (UnloadingRowDetails != null)
     {
         UnloadingRowDetails(this, e);
     }
 }
Exemplo n.º 38
0
 internal void OnUnloadingRowDetailsWrapper(DataGridRow row)
 {
     if (row != null &&
         row.DetailsLoaded == true &&
         row.DetailsPresenter != null)
     {
         DataGridRowDetailsEventArgs e = new DataGridRowDetailsEventArgs(row, row.DetailsPresenter.DetailsElement);
         OnUnloadingRowDetails(e);
         row.DetailsLoaded = false;
     }
 }
Exemplo n.º 39
0
 internal void OnLoadingRowDetailsWrapper(DataGridRow row)
 {
     if (row != null &&
         row.DetailsLoaded == false &&
         row.DetailsVisibility == Visibility.Visible &&
         row.DetailsPresenter != null)
     {
         DataGridRowDetailsEventArgs e = new DataGridRowDetailsEventArgs(row, row.DetailsPresenter.DetailsElement);
         OnLoadingRowDetails(e);
         row.DetailsLoaded = true;
     }
 }