DataGridViewColumns .NET assembly (for VB.NET, C#, C++)

The DataGridView .NET control seems a lot better than DataGrid .NET 1.x control. It provides a powerful and flexible way to display a data source. You can extend the DataGridView control in a number of ways to build custom behaviors into your applications. Although you can create your own types of cells the Windows Forms DataGridView control is mostly column-based, rather than cell-based. As a result, to attain most tasks, you have to work with the columns, not the cells themselves.

Download demo-trial now!

DataGridViewColumns .NET assembly from Rustemsoft is a DataGridView Columns software package specifically designed for .NET developers. The assembly allows you to use all strengths of the MS Windows .NET forms DataGridView control without waiving the user interface elements your customers need.
Disadvantage of DataGridView Unlike the DataGrid, the DataGridView can only show a single table at a time. If you bind an entire DataSet, no data will be displayed, unless you set the DataMember property with the name of the table you want to show. Use DataGrid control for cases like that

Order the DataGridViewColumns assembly

Hot Queston

Read the DataGridViewColumns assembly documentation

Excellent work, guys! Thanks a lot!
Ryan J. Birnesser
Systems Software Designer/Programmer
Pioneer Pole Buildings, Inc.
Schuylkill Haven, PA

These Column classes are chock full of functionality that you wont find in the standard Microsoft .NET DataGridView Columns, that make it easy to build professional and forcing user interfaces and to extend your .NET application.

The DataGridView supports multiple data sources. You can data bind to a data source such as a SQL server, or you can be unbound and manually add/remove rows. You can also use a virtual mode that provides the ability to virtually have 100,000+ rows! The DataGridView even supports a mix of data bound columns and virtual columns.
By using the assembly you can create your own set of DataGridViewColumn objects that defines custom column for the Windows Forms DataGridView control and add them to the GridColumnsCollection. A column is an object that defines what the column looks and behaves like, including such things as color, font, and the presence of controls that will handle linked field in a database with the use of a Combo Box, a DateTime format Box and other control.
Also we have built .NET code samples that describe the concepts and techniques that you can use to build DataGridView features into your applications. The code examples show the various ways to manipulate DataGridView columns using properties of the DataGridViewColumn class.

Skater .NET Obfuscator
More about Skater .NET Obfuscator
Download Skater .NET Obfuscator
Order Skater .NET Obfuscator

ASP DataGridColumns .NET assembly
More about ASPDataGridColumns.dll
Download ASPDataGridColumns.dll
Order ASPDataGridColumns.dll

Controls .NET assembly (WinForms)
More about Rustemsoft.Controls.dll
Download Rustemsoft.Controls.dll
Order Rustemsoft.Controls.dll

The .NET Framework includes six types of DataGridView column classes by default: DataGridViewButtonColumn, DataGridViewCheckBoxColumn, DataGridViewComboboxColumn, DataGridViewImageColumn, DataGridViewTextBoxColumn, and DataGridViewLinkColumn classes. Rustemsoft DataGridViewColumns dynamic link library contains the following DataGridView Columns:

  • DataGridView Combo Column (extended combobox)
  • DataGridView Memo Column
  • DataGridView DateTimePicker Column
  • DataGridView DateTime Column
  • DataGridView Time UpDown Column
  • DataGridView Numeric Column
  • DataGridView Text Fractions Column
  • DataGridView Calculator Column
  • DataGridView Label Column
  • DataGridView DomainUpDown Column
  • DataGridView NumericUpDown Column
  • DataGridView Picture Column
  • DataGridView MaskedTextBox Column
  • DataGridView Print Class
  • DataGridView Combo column (extended combobox)

    The DataGridViewComboColumn contains combobox for a DataGridView on your .NET form. The Combo column is not just a dropdown combobox, which appears when a DataGridView cell becomes the current cell. The .Net DataGridView Combo Column control has the following attractive features:

    This DataGridView Combo column is not just a dropdown combobox, which appears when a DataGridView cell becomes the current cell. This DataGridView Combo Column gives you ability to instantly update dropdown values with a really simple and friendly user interface. When you click the combo button a dropdown multiple columns grid of its list values will be shown below the combo. You can update values,and insert and delete rows into the dictionary DataGridView.

    You can set its DataSource, DisplayMember, and ValueMember to bind the Combo to a foreign table

    The control gives an ability to get a nesting combo box that filters values from a related child table. In a dictionary grid, you can view and edit related data in a child table. In your database a Master table has a one-to-many relationship with a Child table; so for each row of the Master table in Dictionary grid, you or your customer can view and edit the related


    rows of the Child table in a dictionary grid. For this case we have to define two string arrays with key fields' names MasterFields and ChildFields. To get the filtering we must identify Master and Child tables' key fields. These fields names in both arrays must have the same order sequence.

    Syntax
    DataGridViewComboColumn()

    XML Converter is available!
    More about XML Converter
    Download XML Converter
    Order XML Converter

    Some Properties

    box - Combobox object in selected cell. Gets the hosted box control that is an overridden instance of the ComboBox control.

    box.DataSource - a source for DataGridView values list as System.Data.DataTable

    box.DisplayMember - field to display in combo as String (name of table column)

    box.ValueMember - field with values, which binds to combo as String (name of table column). Specify the contents of the ValueMember property in cases where you bind data.

    box.DisplayMode - Identifies what kind of data you would like to see in whole DataGridView customized column, as DataGridViewColumns.DisplayModes. You may choose the following values:
    ShowDisplayMember - default. DisplayMember will be shown in whole column
    ShowValueMember - ValueMember will be shown in whole column
    ShowValueMember_and_DisplayMember - ValueMember + DisplayMember will be shown together in a column

    box.allDictionaryColumns - The property identifies how many columns you need to see in the called Dictionary grid, as DataGridViewColumns.FieldsDisplayType(default is DisplayMember_ValueMember_only)
    You may set the following values:
    DisplayMember_ValueMember_only - default. DisplayMember and/or ValueMember fields will be shown in your drop-down Dictionary grid.
    allFields - all related child table's fields will be shown in your drop-down Dictionary grid.
    allFields_ExceptRelationKey - all related child table's fields will be shown in your Dictionary grid except relation key fields.

    Also you can leave the allDictionaryColumns parameter (define it as null in C# and C++ code) and specify your own columns for the Dictionary DataGridView. Please see our samples to learn how to do that.

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewComboColumn class provided events and class members.

    DataGridView Memo column

    The Rustemsoft DataGridViewMemoColumn gives you a useful Memo Field control, which presents an edit window when user selects a cell of the DataGridView Memo Column on .NET DataGridView. This provides a pop-up memo field editor that you can call from your code at any time to let users edit the text in a memo field.

    This Memo field editor provides more flexibility by updating the memo field to be used in a .NET DataGridView column.

    The DataGridView Memo Column Memo field editor is useful for showing short document contents, like memos and emails.
    When using the DataGridView Memo Column editor you are automatically provided with all general features, which any typical, contemporary word processor has.

    You may send the Memo box content via email by clicking a special button within the memo box control interface.
    The DataGridViewMemoColumn includes a cancel feature. If you click OK the changes made are sent back to the table. When you click on the 'x'-button in the upper right corner or Cancel button your changes will not be stored. You may hide the Cancel button by using the showCancelButton property.

    Syntax
    DataGridViewMemoColumn()
    Some Properties
    box.Caption - a title of Memo editor window as String

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewMemoColumn class provided events and class members.

    DataGridView DateTimePicker column

    The DateTimePicker Column is used to allow the user to select a date and time, and to display that date/time in your DataGridView.

    You can limit the dates and times that can be selected by setting the MinDate and MaxDate properties.

    You can change the look of the calendar portion of the control by setting the CalendarForeColor, CalendarFont, CalendarTitleBackColor, CalendarTitleForeColor, CalendarTrailingForeColor, and CalendarMonthBackground properties.

    The Format property sets the DateTimePickerFormat of the control. The default date Format is DateTimePickerFormat.Long. If the Format property is set to DateTimePickerFormat.Custom, you can create your own format style by setting the CustomFormat property and building a custom format string. The custom format string can be a combination of custom field characters and other literal characters. For example, you can display the date as "June 01, 2001 - Friday" by setting the CustomFormat property to "MMMM dd, yyyy - dddd".

    box - one of the main properties of the DataGridViewDateTimePickerColumn class. The box is DateTimePicker object in selected cell. It gets the hosted box control that is an overridden instance of the DateTimePicker control.

    Syntax
    DataGridViewDateTimePicker()

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewDateTimePicker class provided events and class members.

    DataGridView DateTime Column

    You have a DataGridView with a DateTime field that displays the date/time as "2/20/2005 7:00:00 PM". You would like to display only the time in the following format "7:00 PM". You would like to insert a new time in the column or update current time value only. Let us suppose that you are European and would like to see in date field something like "20.02.2008". The DataGridViewDateTimeColumn can help you design the concept that will resolve your needs.
    The DateTime Column is used to allow the user to insert formatted date and time, and to display that date/time in your DataGridView.

    Syntax
    DataGridViewDateTimeColumn()

    Some Properties

    box - DateTime textbox object in selected cell. Gets the hosted box control that is an overridden instance of the DateTime textbox control.

    box.DateTimeFormat - Various formats may be set. You may use a date/time format (like MMDDYY, MMDDYYYY, DDMMYY, DDMMYYYY, YYYYMMDD, HHMM12, HHMMSS12, HHMM24, HHMMSS24) to enable the date/time inserting and updating. Default is MMDDYYYY.

    box.DefaultValue - any DateTime value. For example, you can set the DefaultValue to today's date. Default is empty DateTime (null/Nothing).

    box.DelimiterChar - a delimiter between date/time fractions (between days and month or hours and minutes). Default is "/".

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewDateTimeColumn class provided events and class members.

    DataGridView TimeUpDown Column

    The Rustemsoft DataGridViewTimeUpDownColumn represents a DataGridView column up-down control that displays Time values. It allows you to show a TimeUpDown control in a DataGridView cell.
    The TimeUpDown column contains a single Time value that can be incremented or decremented by clicking the up or down buttons of the control in a DataGridView cell. You may also enter in a value.
    The Time display may be formatted by setting the TimeFormat property that can have the following values:
    HHMM12
    HHMMSS12
    HHMM24
    HHMMSS24

    Syntax
    DataGridViewTimeUpDownColumn()

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewTimeUpDownColumn class provided events and class members.

    DataGridView Calculator Column

    Calculator DataGridView Column control provides a calculator environment with Real and Complex arithmetic support. This formatted intelligent Calculator control works as the Numeric box control plus a simple, easy-to-use, friendy Calculator interface that pop-ups when Calculator button is clicked. Also it can mask the numbers, digits, decimal and checks the validation, and automatically set the delimiter location. You may input any number. If there is a numeric scale defined with the field, it is used to format the display and the input.

    Note By default the .NET Calculator Column follows the formatting of the original datatable's column. If you define specific parameters (MaxLength, DecimalLength,...) for the box object it will accept them. However if the original DataTable's column could not accept your defined parameters it will ignore your settings. For example, the datatype for an original numeric datatable's field is Integer and you give to the DecimalLength parameter some not zero value. For this case the control will not allow your users to insert decimal values. Please choose appropriate datatypes and column settings.

    Syntax

    DataGridViewCalculatorColumn()
    Some Properties

    box.SpecialFunctionsVisible - as Boolean. Define if Special Functions buttons are Visible in Calculator. Default is False.

    box.CloseByEqualButton - as Boolean. Close Calculator Window by clicking Equal '=' Button. Default is False.

    box.IntegerOnly - as Boolean. Default is False.

    box.PositiveOnly - as Boolean. Default is False.

    box.DefaultValue - any numeric value. Default is empty numeric (null/Nothing).

    box.MinValue - any floating-point value range minimum of the inserted value. Default is empty numeric (null/Nothing).

    box.MaxValue - any floating-point value range maximum of the inserted value. Default is empty numeric (null/Nothing).

    box.DecimalLength - as integer, specifies a fixed decimal length. Default is empty numeric (null/Nothing).


    DataGridView Numeric Column

    This formatted intelligent NumericColumn control can mask the numbers, digits, decimal and checks the validation, and automatically set the delimiter location. You may input any number. If there is a numeric scale defined with the field, it is used to format the display and the input.

    Note By default the numeric column follows the formatting of the original column. If you define specific parameters (MaxLength, DecimalLength,...) for the column it will accept them. However if the original DataTable's column could not accept your defined parameters it will ignore your settings. For example, the datatype for an original numeric datatable's field is Integer and you give to the DecimalLength parameter some not zero value. For this case the control will not allow your users to insert decimal values. Please choose appropriate datatypes and column settings.

    Syntax
    DataGridViewNumericColumn()

    Some Properties

    box - Numeric textbox object in selected cell. Gets the hosted box control that is an overridden instance of the Numeric textbox control.

    box.IntegerOnly - as Boolean. Default is False.

    box.PositiveOnly - as Boolean. Default is False.

    box.DefaultValue - any numeric value. Default is empty numeric (null/Nothing).

    box.MinValue - any floating-point value range minimum of the inserted value. Default is empty numeric (null/Nothing).

    box.MaxValue - any floating-point value range maximum of the inserted value. Default is empty numeric (null/Nothing).

    box.MaxLength - as integer, specifies a fixed length of whole input area. Default is empty numeric (null/Nothing).

    box.DecimalLength - as integer, specifies a fixed decimal length. Default is empty numeric (null/Nothing).

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewNumericColumn class provided events and class members.

    DataGridView Text Fractions Column

    This formatted intelligent TextFractionsColumn control can mask the text fractions. It gives you ability to manage the IP Address, SS#, Phone numbers, etc., and checks the validation, and automatically set the delimiter location.
    The TextFractionsColumn is useful in several situations. For example, this control will automatically format a telephone number so when a user enters a phone number like this:

    123-456-7890
    or
    1234567890

    it will automatically change the numbers in the column text updating box.

    Up to 5 text fractions can be defined. By setting the DelimiterChar property up a delimiter symbol for the control can be specified. You can define the overall length of each text fraction and what kind of characters can be inserted in the fraction (alphanumeric, numeric only, etc.).

    Syntax
    DataGridViewTextFractionsColumn()

    To identify each text fraction you must set values of ten properties where settings of the fractions are stored. The first five properties (I_stFractionFormat, II_ndFractionFormat, IIIrdFractionFormat, IVthFractionFormat, and VthFractionFormat) specifies what characters can be inserted into the fraction. It accepts the following values of FractionFormats enumeration:
    None - format is not assigned
    Numeric - numeric characters (0-9) are acceptable only
    Letters - letters (Aa-Zz) are acceptable only
    Alphanumeric - alphanumeric characters (Aa-Zz0-9) are acceptable only
    Punctuation - punctuation characters are acceptable only
    Spaces - spaces are acceptable only
    AnyCharacters - any characters are acceptable
    The second five box specific properties (I_stFractionLength, II_ndFractionLength, IIIrdFractionLength, IVthFractionLength, and VthFractionLength) specifies overall fraction's length.

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewTextFractionsColumn class provided events and class members.

    DataGridView Label Column

    The control creates a column of Labels mapped to DataColumn of type String.

    The Rustemsoft DataGridViewLabelColumn provides you with a read-only cell. It gives you ability to set all column desired colors and raises an event when the cell is clicked allowing you to interact to the event in your code.

    The DataGridViewLabelColumn raises a Cell event when the user clicks on a cell you can react to this event in your code.

    Syntax
    DataGridViewLabelColumn()

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewLabelColumn class provided events and class members.

    DataGridView DomainUpDown Column

    The Rustemsoft DataGridViewDomainUpDownColumn represents a DataGridView column up-down control that displays string values. It allows you to show a DomainUpDown control in a DataGridView cell.
    The control displays in a DataGridView cell a single string value that is selected from a string collection by clicking the up or down buttons of the control. The user can also enter text in the control if the string typed in matched an item in the collection to be accepted.

    To create a collection of objects to display in the DomainUpDown control, you can add or remove the items individually by using the Add and Remove methods.
    Besides that you can identify a DataSource parameter for the control. The DataSource is a source for DataGridView DomainUpDown column values list as System.Data.DataTable. By defining DisplayMember parameter you can specify a field to display in DomainUpDown column as Integer (index of column) or as String (name of table column).
    The object collection may be sorted alphabetically by setting the Sorted property to true.

    Syntax
    DataGridViewDomainUpDownColumn()

    Some Properties
    DataSource - a source for a DataGridView DomainUpDown column values list as System.Data.DataTable

    DisplayMember - field to display in a column cell as String (name of a DataTable column)

    box - DomainUpDown object in selected cell. Gets the hosted box control that is an overridden instance of the DomainUpDown control.

    Remark. An up-down control is a pair of arrow buttons that the user can click to increment or decrement a value, such as a scroll position or a number displayed in a companion control. The value associated with an up-down control is called its current position.
    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewDomainUpDownColumn class provided events and class members.

    DataGridView NumericUpDown Column

    The Rustemsoft DataGridViewNumericUpDownColumn represents a DataGridView column up-down control that displays numeric values. It allows you to show a NumericUpDown control in a DataGridView cell.
    The NumericUpDown column contains a single numeric value that can be incremented or decremented by clicking the up or down buttons of the control in a DataGridView cell. You may also enter in a value.
    The numeric display may be formatted by setting the DecimalPlaces, Hexadecimal, or ThousandsSeparator properties.

    Syntax
    DataGridViewNumericUpDownColumn()

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewNumericUpDownColumn class provided events and class members.

    DataGridView Picture Column

    The Rustemsoft DataGridViewPictureColumn represents a DataGridView picture column for displaying an image.

    Usually the Picture column is used to display graphics from a bitmap(BMP), icon, metafile, GIF, JPEG or PNG file.
    The Picture is displayed by default without any borders in DataGridView cell. You can provide a standard or 3D border using the BorderStyle property.
    When you click the control the picture raises an event that you can grab in your code.

    Syntax
    DataGridViewPictureColumn()

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewPictureColumn class provided events and class members.

    DataGridView Masked TextBox Column

    The Rustemsoft DataGridView MaskedTextBox Column control provides restricted data input as well as formatted data output. This control supplies visual cues about the type of data being entered or displayed. It uses a mask to distinguish between appropriate and improper user input.
    When the DataGridView MaskedTextBox Column cell is selected at run time, it represents the mask as a series of prompt characters and optional literal characters.

    Each editable mask position, representing a required or optional input, is shown with a single prompt char. For example, the number sign # is often used as a placeholder for a numeric character input. You can use the PromptChar property to specify a custom prompt character. The HidePromptOnLeave property determines if the user sees the prompt characters when the DataGridView MaskedTextBox Column cell loses input focus.

    Syntax
    DataGridViewMaskedTextBoxColumn()

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewPictureColumn class provided events and class members.

    DataGridView Print Class

    Obviously the DataGridViewPrint class is not a DataGridView column control. The service class is intended to help you to create a print output based on your DataGridView content. The class has been included into assembly since it is build for .NET WinForms DataGridView control and very helpful for your .NET DataGridView design. It will help you to implement an application with a print preview and a print support.
    The DataGridViewPrint class is used by the Print dialog and Print Preview dialog (on your .NET form) to draw the DataGridView object content that should be printed. An object of the class is used for a .NET PrintDocument object.

    Syntax
    DataGridViewPrint(PrintDocument1, DataGridView1, bBlackWhite)

    PrintDocument1 - System.Drawing.Printing.PrintDocument reusable object that sends output to a printer
    DataGridView1 - System.Windows.Forms.DataGridView object that content you are going to print
    bBlackWhite - boolean parameter that defines if you like to use "Black and White" printing mode or you would like to send to printer the real coloring that your DataGridView control has currently on your form.

    Please read the DataGridViewColumns assembly documentation to learn more about the DataGridViewPrint class provided members.

    Add a Reference for Visual Studio .NET project

    Suppose you are building a project using Visual Studio.NET, and you decide that you want to start consuming Rustemsoft DataGridViewColumns .NET assembly for a .NET DataGridView control on your Windows form. The first step that you will generally take is, you will add a reference to the DataGridViewColumns .NET assembly, which is residing in some directory on your PC hard drive. Visual Studio .NET will then add a new item under Solution Explorer called 'References', and it will create a row node underneath it called DataGridViewColumns.
    In order to add the reference to DataGridViewColumns .NET assembly please follow the steps:

    Select Project from the menu bar
    Choose Add Reference from the drop down menu
    Click on the Browse button
    Browse to and choose DataGridViewColumnsTrial.dll

    The Reference to a .NET Rustemsoft namespace is a requirement and must be added to a project before the objects in the Rustemsoft namespace can be used. The VB .NET Imports statement (or C# using statement) is not a requirement and is simply a coding convenience that allows shorter names to be used. You can add the statement to your code:

    VB .NET
    Imports Rustemsoft.DataGridViewColumns

    C#
    using Rustemsoft.DataGridViewColumns;

    C++
    #using <DataGridViewColumnsTrial.dll>
    using namespace Rustemsoft;

    Download the DataGridViewColumns .NET assembly code samples for VB.NET and C# that show how you can use the Rustemsoft DataGridView Columns in Windows Forms .NET DataGridView.








    About Rustemsoft

    Rustemsoft LLC is a creative ISV (Independent Software Vendor) specializes in intelligent software solutions for Xcode programmers, XML designers, and .NET developers. Customers always choose Rustemsoft for the high quality and the reliability of our products and services in XML Data development, iOS application design, and .NET software solutions.

    Copyright © 2001-2024 Rustemsoft LLC

    Skater .NET Obfuscator

    TouchControls iOS Framework

    XMLFox

    Home

    Products

    Downloads

    Articles

    Company

    Support