question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request]: `KryptonOutlookGridGroupBox` 'CreateGroupBox' method not found

See original GitHub issue

Hi!

I’ve been using the original KrptonOutlookGrid library from JDH Software. I have an additional method on this library, especifically on KryptonOutlookGridGroupBox.cs:

        /// <summary>
        /// Handles the DragDrop event. Add a new grouping column following a drag drop from the grid
        /// </summary>
        /// <param name="column"></param>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">A DragEventArgs that contains the event data.</param>
        public void CreateGroupBox(DataGridViewColumn column, string groupingType, SortOrder Order, bool sortBySummary)
        {
            string columnToMove = column.Name;
            string columnName = column.Name;
            string columnText = column.HeaderText;
            SortOrder sortOrder;
            DataGridViewColumnSortMode sortMode;
            string[] res = columnToMove.Split('|');
            sortOrder = Order;//SortOrder.Ascending;
            if (sortOrder == SortOrder.None)
                sortOrder = SortOrder.Ascending;
            sortMode = (DataGridViewColumnSortMode)Enum.Parse(typeof(DataGridViewColumnSortMode), column.SortMode.ToString());
            OutlookGridGroupBoxColumn colToAdd = new OutlookGridGroupBoxColumn(columnName, columnText, sortOrder, groupingType);
            //if (res[4] == typeof(OutlookGridDateTimeGroup).Name)
            colToAdd.GroupInterval = res[0];
            colToAdd.SortBySummaryCount = sortBySummary;
            if (!String.IsNullOrEmpty(columnToMove) && !columnsList.Contains(colToAdd) && sortMode != DataGridViewColumnSortMode.NotSortable)
            {
                /*
                //Determine the position of the new Group amongst the others 
                int i = 0; //first group order is 0
                //We are sure that we are going to browse the columns from left to right
                foreach (OutlookGridGroupBoxColumn existingColumn in this.columnsList)
                {
                    if (e.X > (existingColumn.Rect.X + existingColumn.Rect.Width / 2))
                    {
                        i++;
                    }
                }
                */
                columnsList.Insert(0, colToAdd);

                //try
                //{
                //Warns the grid of a new grouping
                OnColumnGroupAdded(new OutlookGridColumnEventArgs(new OutlookGridColumn(columnName, null, null, sortOrder, 0, -1)));
                this.Invalidate();
                //}
                //catch (Exception exc)
                //{
                //    MessageBox.Show("Failed to group.\n\n Error:" + exc.Message,
                //                      "Grid GroupBox",
                //                      MessageBoxButtons.OK,
                //                      MessageBoxIcon.Error);
                //}
            }
        }

This method is not included neither on the original library nor the new one. I don’t really know from where I have it, probably from github, but it’s not mine. I think it’s for creating groups without dragging columns, just by code. I would use it like this:

kryptonOutlookGridGroupBox1.CreateGroupBox(kryptonOutlookGrid1.Columns[2], "OutlookGridDefaultGroup", SortOrder.None, true);

It would crate groups from the values in kryptonOutlookGrid1.Columns[2] and group all the rows of the outlook grid. Is it possible to add it? Is there another way to accomplish this?

Thanks!

EDIT: Sorry for the formatting, I don’t know how to show the code well

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Wagnerpcommented, Feb 7, 2022

Hi @Wagnerp! Sorry to bother but, are there any news about this feature? I was using it with the old library and now there is some issues with my apps because programmatically grouping is not working because of the lack of this method.

Thanks!

Hi @NintendoPlayer At the moment I’m working on this https://github.com/Krypton-Suite/Standard-Toolkit/issues/609. However, hopefully I can work on #290 soon.

1reaction
NintendoPlayercommented, Jan 31, 2022

Hi @Wagnerp! There you have it!

KryptonOutlookGrid.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found