Esempio n. 1
0
            private void OnColumnsCollectionChanged(object sender, CollectionChangeEventArgs args)
            {
                SWF.DataGridColumnStyle column = (SWF.DataGridColumnStyle)args.Element;

                if (args.Action == CollectionChangeAction.Remove)
                {
                    DataGridDataItemEditProvider edit = columns [column];
                    edit.Terminate();
                    RemoveChildProvider(edit);

                    columns.Remove(column);
                }
                else if (args.Action == CollectionChangeAction.Add)
                {
                    DataGridDataItemEditProvider edit
                        = new DataGridDataItemEditProvider(this, column);
                    edit.Initialize();
                    AddChildProvider(edit);

                    columns [column] = edit;
                }
                else if (args.Action == CollectionChangeAction.Refresh)
                {
                    foreach (DataGridDataItemEditProvider edit in columns.Values)
                    {
                        edit.Terminate();
                    }
                    OnNavigationChildrenCleared();
                }
            }
Esempio n. 2
0
            public override void InitializeChildControlStructure()
            {
                for (int column = 0; column < provider.CurrentTableStyle.GridColumnStyles.Count; column++)
                {
                    SWF.DataGridColumnStyle columnStyle = provider.CurrentTableStyle.GridColumnStyles [column];

                    DataGridDataItemEditProvider edit
                        = new DataGridDataItemEditProvider(this, columnStyle);
                    edit.Initialize();
                    AddChildProvider(edit);

                    if (column == 0)
                    {
                        name = GetName(edit);
                    }

                    columns [columnStyle] = edit;
                }

                // To keep track of columns
                DataGridProvider.CurrentTableStyle.GridColumnStyles.CollectionChanged += OnColumnsCollectionChanged;
            }
Esempio n. 3
0
			private void OnColumnsCollectionChanged (object sender, CollectionChangeEventArgs args)
			{
				SWF.DataGridColumnStyle column = (SWF.DataGridColumnStyle) args.Element;

				if (args.Action == CollectionChangeAction.Remove) {
					DataGridDataItemEditProvider edit = columns [column];
					edit.Terminate ();
					RemoveChildProvider (edit);

					columns.Remove (column);
				} else if (args.Action == CollectionChangeAction.Add) {
					DataGridDataItemEditProvider edit 
						= new DataGridDataItemEditProvider (this, column);
					edit.Initialize ();
					AddChildProvider (edit);

					columns [column] = edit;
				} else if (args.Action == CollectionChangeAction.Refresh) {
					foreach (DataGridDataItemEditProvider edit in columns.Values)
						edit.Terminate ();
					OnNavigationChildrenCleared ();
				} 
			}
Esempio n. 4
0
			public override void InitializeChildControlStructure ()
			{
				for (int column = 0; column < provider.CurrentTableStyle.GridColumnStyles.Count; column++) {
					SWF.DataGridColumnStyle columnStyle = provider.CurrentTableStyle.GridColumnStyles [column];
					
					DataGridDataItemEditProvider edit 
						= new DataGridDataItemEditProvider (this, columnStyle);
					edit.Initialize ();
					AddChildProvider (edit);

					if (column == 0)
						name = GetName (edit);
					
					columns [columnStyle] = edit;
				}

				// To keep track of columns
				DataGridProvider.CurrentTableStyle.GridColumnStyles.CollectionChanged += OnColumnsCollectionChanged;
			}