示例#1
0
		private void SetSortLabel()
		{
			System.Text.StringBuilder strFields = new System.Text.StringBuilder();
			if (mGridEX.RootTable.SortKeys.Count == 0)
			{
				this.lblSort.Text = "None";
			}
			else
			{
				foreach (GridEXSortKey sortKey in mGridEX.RootTable.SortKeys)
				{
					if (strFields.Length > 0)
					{
						strFields.Append(", ");
					}
					strFields.Append(NorthwindApp.GetColumnFriendlyName(sortKey.Column));
                    if (sortKey.SortOrder == Janus.Windows.GridEX.SortOrder.Ascending)
					{
						strFields.Append(" (Ascending)");
					}
					else
					{
						strFields.Append(" (Descending)");
					}
				}
				this.lblSort.Text = strFields.ToString();
			}
		}
示例#2
0
		private void SetFieldsLabel()
		{
			System.Text.StringBuilder strFields = new System.Text.StringBuilder();
			GridEXColumn column = null;
            for (int i = 0; i < mGridEX.RootTable.Columns.Count; i++)
			{
				column = mGridEX.RootTable.Columns.GetColumnInPosition(i);
				if (column != null && column.Visible)
				{
					if (strFields.Length > 0)
					{
						strFields.Append(", ");
					}
					strFields.Append(NorthwindApp.GetColumnFriendlyName(column));
				}
			}
			this.lblFields.Text = strFields.ToString();
			if (mGridEX.RootTable.CellLayoutMode == CellLayoutMode.UseColumnSets)
			{
				this.btnFields.Enabled = false;
			}
		}
示例#3
0
		private void SetGroupByLabel()
		{

			System.Text.StringBuilder strFields = new System.Text.StringBuilder();
			if (mGridEX.RootTable.Groups.Count == 0)
			{
				this.lblGroupBy.Text = "None";
			}
			else
			{
				foreach (GridEXGroup group in mGridEX.RootTable.Groups)
				{
					if (strFields.Length > 0)
					{
						strFields.Append(", ");
					}
					if (group.Column != null)
					{
						strFields.Append(NorthwindApp.GetColumnFriendlyName(group.Column));
					}
					else
					{
						strFields.Append(group.HeaderCaption);
					}
					if (group.SortOrder == Janus.Windows.GridEX.SortOrder.Ascending)
					{
						strFields.Append(" (Ascending)");
					}
					else
					{
						strFields.Append(" (Descending)");
					}
				}

				this.lblGroupBy.Text = strFields.ToString();
			}
		}