public Form1()
        {
            InitializeComponent();
            var data = new OrderInfoCollection();

            sfDataGrid.DataSource = data.OrdersListDetails;

            GridTableSummaryRow tableSummaryRow1 = new GridTableSummaryRow();

            tableSummaryRow1.Name             = "TableSummary";
            tableSummaryRow1.ShowSummaryInRow = false;
            tableSummaryRow1.Title            = " Total Product Count: {OrderID}";
            tableSummaryRow1.Position         = VerticalPosition.Bottom;

            GridSummaryColumn summaryColumn1 = new GridSummaryColumn();

            summaryColumn1.Name        = "OrderID";
            summaryColumn1.SummaryType = SummaryType.CountAggregate;
            summaryColumn1.Format      = "{Count}";
            summaryColumn1.MappingName = "OrderID";

            GridSummaryColumn summaryColumn2 = new GridSummaryColumn();

            summaryColumn2.Name        = "Quantity";
            summaryColumn2.SummaryType = SummaryType.Int32Aggregate;
            summaryColumn2.Format      = "{Sum}";
            summaryColumn2.MappingName = "Quantity";

            tableSummaryRow1.SummaryColumns.Add(summaryColumn1);
            tableSummaryRow1.SummaryColumns.Add(summaryColumn2);

            this.sfDataGrid.TableSummaryRows.Add(tableSummaryRow1);
        }
        public Form1()
        {
            InitializeComponent();
            var data = new OrderInfoCollection();

            sfDataGrid.DataSource = data.OrdersListDetails;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates the list view for display the items.
        /// </summary>
        private void CreateListView()
        {
            // Set the view to show details.
            listView1.View          = View.Details;
            listView1.LabelEdit     = true;
            listView1.FullRowSelect = true;
            listView1.GridLines     = true;

            listView1.Columns.Add("Order ID", 100, HorizontalAlignment.Left);
            listView1.Columns.Add("Customer ID", 100, HorizontalAlignment.Left);
            listView1.Columns.Add("Order Date", 150, HorizontalAlignment.Left);
            listView1.Columns.Add("Product Name", 150, HorizontalAlignment.Left);
            listView1.Columns.Add("Quantity", 100, HorizontalAlignment.Left);
            listView1.Columns.Add("ShipCountry", 100, HorizontalAlignment.Left);
            listView1.Columns.Add("UnitPrice", 100, HorizontalAlignment.Left);
            listView1.Columns.Add("ContactNumber", 100, HorizontalAlignment.Left);


            List <OrderInfo> OrderInfoList = new OrderInfoCollection().GetListOrdersDetails(100);

            foreach (OrderInfo order in OrderInfoList)
            {
                ListViewItem listItem = new ListViewItem(order.OrderID.ToString());
                listItem.SubItems.Add(order.CustomerID.ToString());
                listItem.SubItems.Add(order.OrderDate.ToString());
                listItem.SubItems.Add(order.ProductName.ToString());
                listItem.SubItems.Add(order.Quantity.ToString());
                listItem.SubItems.Add(order.ShipCountry.ToString());
                listItem.SubItems.Add(order.UnitPrice.ToString());
                listItem.SubItems.Add(order.ContactNumber.ToString());
                listView1.Items.Add(listItem);
            }
        }
        public Form1()
        {
            InitializeComponent();
            var data = new OrderInfoCollection();

            sfDataGrid.DataSource           = data.OrdersListDetails;
            this.sfDataGrid.QueryCellStyle += sfDataGrid_QueryCellStyle;
        }
Exemplo n.º 5
0
        public Form1()
        {
            InitializeComponent();
            data = new OrderInfoCollection();
            sfDataGrid.DataSource = data.OrdersListDetails;

            this.sfDataGrid.IndentColumnWidth = 0;
        }
        public Form1()
        {
            InitializeComponent();
            var data = new OrderInfoCollection();

            sfDataGrid.DataSource = data.OrdersListDetails;

            this.sfDataGrid.SelectionController = new CustomSelectionController(sfDataGrid);
        }
        public Form1()
        {
            InitializeComponent();
            var data = new OrderInfoCollection();

            sfDataGrid.DataSource = data.OrdersListDetails;

            this.sfDataGrid.CurrentCellBeginEdit += sfDataGrid1_CurrentCellBeginEdit;
            this.sfDataGrid.CurrentCellEndEdit   += sfDataGrid1_CurrentCellEndEdit;
        }
Exemplo n.º 8
0
        public Form1()
        {
            InitializeComponent();
            var data = new OrderInfoCollection();

            sfDataGrid.DataSource = data.OrdersListDetails;

            this.sfDataGrid.AllowSorting  = false;
            this.sfDataGrid.SelectionUnit = SelectionUnit.Cell;
            this.sfDataGrid.SelectionMode = GridSelectionMode.Extended;
            this.sfDataGrid.CellClick    += sfDataGrid_CellClick;
        }
        public Form1()
        {
            InitializeComponent();
            var data = new OrderInfoCollection();

            sfDataGrid.DataSource = data.OrdersListDetails;

            GridTableSummaryRow tableSummaryRow1 = new GridTableSummaryRow();

            tableSummaryRow1.Name             = "TableSummary";
            tableSummaryRow1.ShowSummaryInRow = true;
            tableSummaryRow1.Title            = " Total Product Count: {ProductName}";
            tableSummaryRow1.Position         = VerticalPosition.Bottom;

            GridSummaryColumn summaryColumn1 = new GridSummaryColumn();

            summaryColumn1.Name        = "ProductName";
            summaryColumn1.SummaryType = SummaryType.CountAggregate;
            summaryColumn1.Format      = "{Count}";
            summaryColumn1.MappingName = "ProductName";

            tableSummaryRow1.SummaryColumns.Add(summaryColumn1);

            this.sfDataGrid.TableSummaryRows.Add(tableSummaryRow1);


            GridSummaryRow groupSummaryRow1 = new GridSummaryRow();

            groupSummaryRow1.Name             = "GroupSummary";
            groupSummaryRow1.ShowSummaryInRow = true;
            groupSummaryRow1.Title            = " Total Product Count: {ProductName}";


            // Adds the GridSummaryColumn in SummaryColumns collection.
            groupSummaryRow1.SummaryColumns.Add(summaryColumn1);

            // Adds the summary row in the GroupSummaryRows collection.
            this.sfDataGrid.GroupSummaryRows.Add(groupSummaryRow1);


            this.sfDataGrid.SelectionController = new CustomRowSelectionController(this.sfDataGrid);

            this.sfDataGrid.AutoExpandGroups = true;
            this.sfDataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription()
            {
                ColumnName = "OrderDate"
            });
            this.sfDataGrid.ClearSelection();
        }
Exemplo n.º 10
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            //To add built-in busy indicator
            //sfDataGrid.ShowBusyIndicator = true;

            //OR

            //To add busy indicator control for SfDataGrid based on requirement.
            buysIndicator.Show(sfDataGrid.TableControl);
            var data = new OrderInfoCollection();

            sfDataGrid.DataSource = data.OrdersListDetails;
            //To hide the busy indicator after the process is completed.
            buysIndicator.Hide();
        }
Exemplo n.º 11
0
        public Form1()
        {
            InitializeComponent();
            OrderInfoCollection data = new OrderInfoCollection();

            this.sfListView1.DataSource    = data.OrdersListDetails;
            this.sfListView1.DisplayMember = "ProductName";
            this.sfListViewSettings();
            try
            {
                Bitmap bmp = new Bitmap(Image.FromFile(@"../../Icon/sficon.ico"));
                this.Icon = Icon.FromHandle(bmp.GetHicon());
            }
            catch (Exception ex)
            { }
        }