0

I am looking for a C# WinForms grid control, which is designed or conceived as rows of controls.

My requirement is that each row can have different sets of controls, or even if some rows have same controls, the controls' width on the next row may be different from the controls' width in the previous row.

To clarify, I am NOT looking for a standard grid control whose layout is in rows and columns, where a cell's width in all the rows of a column is identical, or at best can be made to merge with adjacent cells.

In my case, the cell merge feature will also not work, as that will be quite complicated to achieve for cases where each row's cells have arbitrary width.

Although, I may be able to achieve my requirement using FlowLayoutPanel, but I am looking for a third party grid control which has this feature and a host of other powerful features.

One problem in FlowLayoutPanel is it automatically flows the controls of one row to next row, if they dont fit in the current row. I do not want this behaviour.

When the form is resized, I want the grid control to support 2 options:

Option 1:

if I specify controls NOT to resize and the form is resized upwards, let blank space remain at end, and if the form is resized downwards, let it enforce a minimum form width depending on the max width required to display all the rows.

Option 2:

If I specify that controls should resize, the grid should proportionately resize all the controls as the form is being resized and the grid resizes.

Is there such a third party control in the market (let it be free or paid)? If not, how can I build it myself or get it built from some freelance developer?

Other desirable features (but not mandatory):

  1. Specify how many adjacent rows should have the same layout (In case I want to display standard tabular data within a part of the grid)

  2. Bound and un-bound mode support

  3. Good Performance in handling thousands of rows.
0

Syncfusion Layout controls for Windows Forms provides the functionality to arrange the controls in the form. Each layout control has its own functionality. 

  • BorderLayout
  • CardLayout
  • FlowLayout – It is same as the MS FlowLayoutPanel and we provided the additional options like AutoRowHeight and so on.
  • GridBagLayout

GridBagLayout Control

The followings are the limitations of the layout controls for your requirement,

Different control width in different row

Our layout controls won’t support to define the different column widths for different rows since they are arranged in the rows and columns. The column width is limited to next adjacent column width. So, it’s not possible. 

Option – 1

Our layout controls are designed to arrange the controls in the view. Our layout controls are filled in the form. It cannot be resized within the client area of the form. As the requirement is more complicated than our existing design, it cannot be achieved. 

Option – 2

The controls can be resized proportionally as the form size is being resized with our GridLayout control.

GridLayout Control

Free license

The whole suite of controls and libraries is available for free through the community license program if you qualify (less than 1 million USD in revenue). Note: I work for Syncfusion.

  • 1
    As you yourself said, this won't meet my requirement. – AllSolutions Aug 2 '18 at 15:24
  • @AllSolutions, Yes. I have provided the details about the available layout controls and its limitations. Moreover, i have added the screenshots to illustrate what can be achieved. Please refer the screenshots and kindly let us know if controls can be used. – Neelakandan K Aug 3 '18 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.