コード例 #1
0
		public CompositeColumnsGroupcontrol(GridEXGroup group, GridEXTable table)
		{

			// This call is required by the Windows Form Designer.
			InitializeComponent();

			mCompositeColumns = new List<GridEXColumn>();

			this.CreateGridsTable();
			if (group.Table != null)
			{
				this.Table = group.Table;
			}
			else
			{
				this.Table = table;
			}
			// Add any initialization after the InitializeComponent() call.

			this.mGroup = group;
			if (mGroup.CustomGroup != null)
			{
				this.CustomGroup = mGroup.CustomGroup;
			}
			else
			{
				GridEXCustomGroup newCustomGroup = new GridEXCustomGroup();
				newCustomGroup.CustomGroupType = CustomGroupType.CompositeColumns;
				this.CustomGroup = newCustomGroup;
				mGroup.CustomGroup = newCustomGroup;
			}

		}
コード例 #2
0
ファイル: frmGroupBy.cs プロジェクト: mwilian/demos
		private bool ValidateCustomGroup(GridEXCustomGroup customGroup)
		{

			if (customGroup.CustomGroupType == CustomGroupType.CompositeColumns)
			{
				if (customGroup.CompositeColumns == null || customGroup.CompositeColumns.Length == 0)
				{

					MessageBox.Show("CompositeColumns are not defined in the group", MainQD.MessageCaption, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					return false;
				}
				else
				{
					foreach (GridEXColumn col in customGroup.CompositeColumns)
					{
						if (! this.Table.CanGroupBy(col))
						{
							MessageBox.Show("Column '" + col.DataMember + "' can not be used in a group of this table.", MainQD.MessageCaption, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							return false;
						}
					}
				}
			}
			return true;
		}
コード例 #3
0
		private void CreateCustomGroup()
		{
			GridEXCustomGroup customGroup = new GridEXCustomGroup();
			customGroup.CustomGroupType = CustomGroupType.ConditionalGroupRows;
			customGroup.Key = MainQD.GetCustomGroupName(this.mTable.CustomGroups, "Custom Group ", 0);
			this.mTable.CustomGroups.Add(customGroup);

			this.cboSelectCustomGroup.Items.Add(customGroup.Key, customGroup);
			this.cboSelectCustomGroup.SelectedItem = this.cboSelectCustomGroup.Items[customGroup.Key];
		}
コード例 #4
0
        private void button2_Click(object sender, System.EventArgs e)
        {
            GridEXCustomGroup customGroup = new GridEXCustomGroup();
            GridEXCustomGroupRow groupRow;
            groupRow = new GridEXCustomGroupRow("Owner", this.gridEX1.RootTable.Columns["ContactTitle"], "Owner");
            groupRow.ShowWhenEmpty = true;
            customGroup.GroupRows.Add(groupRow);

            groupRow = new GridEXCustomGroupRow("Other");
            groupRow.Condition = new GridEXFilterCondition(gridEX1.RootTable.Columns["ContactTitle"], ConditionOperator.NotEqual, "Owner");
            groupRow.ShowWhenEmpty = true;
            customGroup.GroupRows.Add(groupRow);

            this.gridEX1.RootTable.Groups.Clear();
            GridEXGroup group = new GridEXGroup(customGroup);
            group.GroupPrefix = "Contact Title:";
            group.HeaderCaption = "Contact Title";
            this.gridEX1.RootTable.Groups.Add(group);
            this.gridEX1.GetRow(0).Expanded = true;
        }
コード例 #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            GridEXCustomGroup customGroup = new GridEXCustomGroup();

            GridEXCustomGroupRow groupRow;
            groupRow = new GridEXCustomGroupRow("US Customers",this.gridEX1.RootTable.Columns["Country"],"USA");
            groupRow.ShowWhenEmpty = true;
            customGroup.GroupRows.Add(groupRow);

            groupRow = new GridEXCustomGroupRow("Foreign Customers");
            groupRow.Condition = new GridEXFilterCondition(gridEX1.RootTable.Columns["Country"], ConditionOperator.NotEqual, "USA");
            groupRow.ShowWhenEmpty = true;
            customGroup.GroupRows.Add(groupRow);

            this.gridEX1.RootTable.Groups.Clear();
            GridEXGroup group = new GridEXGroup(customGroup);
            group.HeaderCaption = "US and foreign customers";
            this.gridEX1.RootTable.Groups.Add(group);
            this.gridEX1.GetRow(0).Expanded = true;
        }
コード例 #6
0
        private void button2_Click(object sender, System.EventArgs e)
        {
            GridEXCustomGroup    customGroup = new GridEXCustomGroup();
            GridEXCustomGroupRow groupRow;

            groupRow = new GridEXCustomGroupRow("Owner", this.gridEX1.RootTable.Columns["ContactTitle"], "Owner");
            groupRow.ShowWhenEmpty = true;
            customGroup.GroupRows.Add(groupRow);

            groupRow               = new GridEXCustomGroupRow("Other");
            groupRow.Condition     = new GridEXFilterCondition(gridEX1.RootTable.Columns["ContactTitle"], ConditionOperator.NotEqual, "Owner");
            groupRow.ShowWhenEmpty = true;
            customGroup.GroupRows.Add(groupRow);

            this.gridEX1.RootTable.Groups.Clear();
            GridEXGroup group = new GridEXGroup(customGroup);

            group.GroupPrefix   = "Contact Title:";
            group.HeaderCaption = "Contact Title";
            this.gridEX1.RootTable.Groups.Add(group);
            this.gridEX1.GetRow(0).Expanded = true;
        }
コード例 #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            GridEXCustomGroup customGroup = new GridEXCustomGroup();

            GridEXCustomGroupRow groupRow;

            groupRow = new GridEXCustomGroupRow("US Customers", this.gridEX1.RootTable.Columns["Country"], "USA");
            groupRow.ShowWhenEmpty = true;
            customGroup.GroupRows.Add(groupRow);

            groupRow               = new GridEXCustomGroupRow("Foreign Customers");
            groupRow.Condition     = new GridEXFilterCondition(gridEX1.RootTable.Columns["Country"], ConditionOperator.NotEqual, "USA");
            groupRow.ShowWhenEmpty = true;
            customGroup.GroupRows.Add(groupRow);

            this.gridEX1.RootTable.Groups.Clear();
            GridEXGroup group = new GridEXGroup(customGroup);

            group.HeaderCaption = "US and foreign customers";
            this.gridEX1.RootTable.Groups.Add(group);
            this.gridEX1.GetRow(0).Expanded = true;
        }