Ejemplo n.º 1
0
        void GrdBrowse_RecordActivated(object sender, Infragistics.Windows.DataPresenter.Events.RecordActivatedEventArgs e)
        {
            try
            {
                BasicGridView datagrd = sender as BasicGridView;
                if (datagrd.ActiveRecord != null)
                {
                    if (datagrd.ActiveRecord.Index >= 0 && datagrd.ActiveRecord.RecordType == RecordType.DataRecord)
                    {
                        dsHdm.Tables[1].DefaultView.RowFilter = "";
                        string sFilterCt = "1 =1 ";

                        sFilterCt += string.Format("{0} {1} = '{2}'", sFilterCt == "" ? "" : " and ", "stt_rec",
                                                   ((datagrd.ActiveRecord as DataRecord).DataItem as DataRowView)["stt_rec"].ToString());

                        dsHdm.Tables[1].DefaultView.RowFilter += sFilterCt;

                        GrdBrowseCt.DataSource = dsHdm.Tables[1].DefaultView;
                    }
                }
            }
            catch (Exception ex)
            {
                SmErrorLib.ErrorLog.CatchMessage(ex);
            }
        }
Ejemplo n.º 2
0
        private void BasicGridView_ItemClick(object sender, ItemClickEventArgs e)
        {
            SaveState();

            var gift = (e.ClickedItem as CustomDataObject);


            ConnectedAnimation animation = null;

            // Get the collection item corresponding to the clicked item.
            if (BasicGridView.ContainerFromItem(e.ClickedItem) is GridViewItem container)
            {
                // Stash the clicked item for use later. We'll need it when we connect back from the detailpage.
                _storedItem = container.Content;

                // Prepare the connected animation.
                // Notice that the stored item is passed in, as well as the name of the connected element.
                // The animation will actually start on the Detailed info page.
                animation = BasicGridView.PrepareConnectedAnimation("forwardAnimation", _storedItem, "connectedElement");
            }



            SmokeGrid.DataContext = gift;

            SmokeGrid.Visibility = Visibility.Visible;

            animation.TryStart(destinationElement);
        }
Ejemplo n.º 3
0
        private async void BackButton_Click(object sender, RoutedEventArgs e)
        {
            SaveState();

            ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("backwardsAnimation", destinationElement);

            // Collapse the smoke when the animation completes.
            animation.Completed += Animation_Completed;

            // If the connected item appears outside the viewport, scroll it into view.
            BasicGridView.ScrollIntoView(_storedItem, ScrollIntoViewAlignment.Default);
            BasicGridView.UpdateLayout();

            // Use the Direct configuration to go back (if the API is available).
            if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))
            {
                animation.Configuration = new DirectConnectedAnimationConfiguration();
            }

            // Play the second connected animation.
            await BasicGridView.TryStartConnectedAnimationAsync(animation, _storedItem, "connectedElement");

            Animation_Completed(null, null);
        }