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

A quantity of jobs you may want to achieve with the Windows Forms DataGrid control are, unexpectedly, more troublesome than you might expect. Principally, this is because the Windows Forms DataGrid control is column-based, rather than cell-based. As a result, to attain most tasks, you have to work with the columns, not the cells themselves.
DataGridColumns .NET assembly from RustemSoft is a DataGrid Columns Styles software package specifically designed for .NET developers. The assembly allows you to use all strengths of the MS Windows .NET forms DataGrid control without waiving the user interface elements your customers need.

Download demo-trial now!

The DataGridColumns assembly works exceptionally well. It does all the things that I needed it to do! You have created an excellent product!
Stephen Hamburg, IT Engineer

Read the DataGridColumns assembly documentation

Order the DataGridColumns assembly

Hot Queston

By using the assembly you can create your own set of DataGridColumnStyle objects that defines custom column styles for the Windows Forms DataGrid control and add them to the GridColumnStylesCollection.

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

A column style 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 Check Box and other control. The .NET Framework includes two types of column-style classes by default: the DataGridTextBoxColumn and DataGridBoolColumn classes. DataGridColumns dynamic link library contains the following DataGrid Column Styles:

  • DataGrid combobox
  • DataGrid XPButton column Style
  • DataGrid Memo column Style
  • DataGrid Button column Style
  • DataGrid DateTimePicker column Style
  • DataGrid DateTime Column Style
  • DataGrid Numeric Column Style
  • DataGrid Text Fractions Column Style
  • DataGrid Check Column Style
  • DataGrid Label Column Style
  • DataGrid TextEdit Column Style
  • DataGrid DomainUpDown Column Style
  • DataGrid NumericUpDown Column Style
  • DataGrid Picture Column Style
  • DataGrid Print Class
  • DataGrid combobox column Style

    The DataGridColumnStyle contains combobox for a DataGrid on your .Net form. It is not just a dropdown combobox, which appears when a datagrid cell becomes the current cell. This .Net DataGrid DataGridColumnStyle combobox control has the following attractive features:

    This combobox DataGridColumnStyle automatically fills the text at the cursor with the value of its dropdown values list. As characters are typed, the component finds the closest matching item from the list and automatically fills in the remaining characters. Appended characters are highlighted so that they are replaced by any further typing. For this auto-filling feature you can setup the character case sensibility.

    This DataGridColumnStyle gives you ability to instantly update dropdown values with a really simple and friendly user interface. When you click the additional dropdown button of the combo a dictionary of its list values will be displayed below the combo. You can update values, and insert and delete rows in the dictionary grid.

    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.


    You can turn off all or some of these features and use the combobox DataGridColumnStyle just as an easy dropdown DataGrid combobox.

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


    Syntax
    DataGridComboBoxColumn(DataSource, DisplayMember, ValueMember, SearchInList, CaseSensitiveSearch, CallDictionary, DisplayMode, allDictionaryColumns)

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

    Parameters

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

    DisplayMember - field to display in combo as Integer (index of column) or as String (name of table column)

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

    SearchInList - identifies if you need auto-fill features as Boolean (default is True)

    CaseSensitiveSearch - as Boolean (default is False)

    CallDictionary - as Boolean (default is True). If False - the combobox is just a dropdown combobox without the dictionary grid.

    DisplayMode - Identifies what kind of data you would like to see in whole DataGrid customized column, as DataGridComboBoxColumn.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

    allDictionaryColumns - works if CallDictionary is True only. The parameter identifies how many columns you need to see in the called Dictionary grid (default is 0)
    You may set the following values:
    0 - default. DisplayMember and/or ValueMember fields will be shown in your Dictionary grid.
    1 - all related child table's fields will be shown in your Dictionary grid.
    2 - 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 datagrid. Please see our samples to learn how to do that.

    How to change the background color for DataGridComboBoxColumn columns in a datagrid? What about other properties?How to setup the combo box that filters values from a related child table?How to enclose a nesting Dictionary to other Dictionary datagrid?How to define columns for a Dictionary datagrid? Please read the DataGridColumns assembly documentation to learn more about the DataGridComboboxColumn class provided events and class members.

    DataGrid XP Button column Style

    DataGridXPButtonColumn allows you to provide the datagrid interface your users are requesting, while supporting the utterly powerful Microsoft .NET DataGrid control. The DataGridXPButtonColumn makes the MS .NET DataGrid control one of the most powerful controls that you ever had used. A RustemSoft DataGridXPButtonColumn column in a .net DataGrid control gives you ability to define custom functionality for items in the grid beyond the edit, delete, select, and hyperlink features of other column types. For example, you can use a DataGridXPButtonColumn to create a "Link to a website" button.
    The DataGridXPButtonColumn has a pushbutton-style only. The button captions can be a text read from a database.
    When you define a button column, you specify a command associated with the button. The Click event of DataGridXPButtonColumn class occurs when the user clicks the button, the button's command is passed to a container where you can handle it with your custom code.

    DataGridXPButtonColumn control shows a button instead of text, even when the containing cell does not have focus. To switch the feature off change value of ButtonInEachCell parameter to False and only the selected button column's cell will appear as a button. Also you can assign a Title for each button in your button column instead of populating table field's text. Just assign value of PerpetualText property.

    Syntax
    DataGridXPButtonColumn()
    Parameters
    No parameters
    Handled Event
    DataGridXPButtonColumn Click event runs when the datagrid XPButtonColumn Style's Button control is clicked. The procedure receives three arguments:
    sender as DataGridXPButtonColumn, ColumnMappingName and ColumnValueAtRow of String type.
    You have to have the following specification in your code:
    VB .NET
    Private Sub XPButtonColumn_Click(ByVal sender As DataGridXPButtonColumn, ByVal ColumnMappingName As String, _
    ByVal ColumnValueAtRow As String) Handles XPButtonColumn.Click
    ......
    End Sub


    C#
    public void XPButtonColumn_Click(DataGridXPButtonColumn sender, string ColumnMappingName, string ColumnValueAtRow)
    {
    ..................
    }

    How to react to DataGridXPButtonColumn Click event in your code? Please read the DataGridColumns assembly documentation to learn more about the DataGridXPButtonColumn class provided events and class members.

    DataGrid Memo column Style

    The RustemSoft DataGridMemoColumn gives you a useful Memo Field control, which presents an edit window when user selects a cell of the DataGrid Memo Column on .NET DataGrid. 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 DataGrid column.

    The DataGrid Memo Column Memo field editor is useful for showing short document contents, like memos and emails.

    The DataGridMemoColumn 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.

    When using the DataGrid Memo Column editor you are automatically provided with all general features, which any typical, contemporary word processor has.

    Syntax
    DataGridMemoColumn(MemoCaption)
    Parameters
    MemoCaption - a title of Memo editor window as String

    Please read the DataGridColumns assembly documentation to learn more about the DataGridMemoColumn class provided events and class members.

    DataGrid Button column Style

    DataGridButtonColumn ColumnStyle represents standard window button in your DataGrid customized column and has the same functionalities like DataGridXPButtonColumn component, which is described above. Except Syntax and Parameters


    Syntax
    DataGridButtonColumn(ButtonForeColor, ButtonBackColor)
    Parameters
    ButtonForeColor - as System.Drawing.Color
    ButtonBackColor - as System.Drawing.Color
    Also you may set datagrid Button ColumnStyle for your column without color identifications as the following:
    DataGridButtonColumn()
    Handled Event
    DataGridXPButtonColumn Click event runs when the datagrid XPButtonColumn Style's Button control is clicked. The procedure receives three arguments:
    sender as DataGridXPButtonColumn, ColumnMappingName and ColumnValueAtRow of String type.
    You have to have the following specification in your code:
    VB .NET
    Private Sub XPButtonColumn_Click(ByVal sender As DataGridXPButtonColumn, ByVal ColumnMappingName As String, _
    ByVal ColumnValueAtRow As String) Handles XPButtonColumn.Click
    ......
    End Sub


    C#
    public void XPButtonColumn_Click(DataGridXPButtonColumn sender, string ColumnMappingName, string ColumnValueAtRow)
    {
    ..................
    }

    Please read the DataGridColumns assembly documentation to learn more about the DataGridButtonColumn class provided events and class members.

    DataGrid DateTimePicker column Style

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

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

    Sonswish - Oracle database browser
    More about Sonswish
    Download Sonswish Trial
    Order Sonswish

    Syntax
    DataGridDateTimePicker()

    How to change the display format for DateTimePicker columns in a datagrid? What about other properties?How to delete a value from DateTimePickerColumn cell? Please read the DataGridColumns assembly documentation to learn more about the DataGridDateTimePicker class provided events and class members.

    DataGrid DateTime Column Style

    You have a DataGrid 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.2005". The DataGridDateTimeColumn style can help you design the concept that will resolve your needs.
    The DateTime ColumnStyle is used to allow the user to insert formatted date and time, and to display that date/time in your DataGrid.

    Syntax
    DataGridDateTimeColumn(Format, DefaultValue, DelimiterChar)

    Parameters

    Format - 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.

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

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

    How to turn off error messages? How to define error messages in my native language? Please read the DataGridColumns assembly documentation to learn more about the DataGridDateTimeColumn class provided events and class members.

    DataGrid Numeric Column Style

    This formatted intelligent NumericColumn style 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
    DataGridNumericColumn(IntegerOnly, PositiveOnly, DefaultValue, MinValue, MaxValue, MaxLength, DecimalLength)

    Parameters

    IntegerOnly - as Boolean. Default is False.

    PositiveOnly - as Boolean. Default is False.

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

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

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

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

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

    How to turn off error messages? How to define error messages in my native language?How to change the background color for DataGridNumericColumn columns in a datagrid? Please read the DataGridColumns assembly documentation to learn more about the DataGridNumericColumn class provided events and class members.

    DataGrid Text Fractions Column Style

    This formatted intelligent TextFractionsColumn style 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 style is useful in several situations. For example, this control will automatically format a telephone number so when a user enters their 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
    DataGridTextFractionsColumn()

    To identify each text fraction you must set values of two-dimensional array where properties of the fractions are stored. The first array's element specifies what characters can be inserted into the fraction. It accepts the following values:
    N - numeric characters (0-9) are acceptable only
    L - letters (Aa-Zz) are acceptable only
    A - alphanumeric characters (Aa-Zz0-9) are acceptable only
    P - punctuation characters are acceptable only
    S - spaces are acceptable only
    Empty - any characters are acceptable
    The second array's element specifies overall fraction's length.

    How to specify the column's text fractions properties?How to turn off error messages? How to define error messages in my native language?How to specify the 'Password' text column for inserting and displaying passwords only? Please read the DataGridColumns assembly documentation to learn more about the DataGridTextFractionsColumn class provided events and class members.

    DataGrid Check Column Style

    DataGrid Check column style accepts and displays true, false values. The RustemSoft DataGridCheckColumn control specifies a column in which each cell contains a check box for representing a Boolean value.
    The Check Column in a default state, is used in a similar manner as the standard Microsoft DataGridBoolColumn binding to a boolean datacolumn and displaying a checkbox. Besides using Boolean data type field as a source field you can use also String data type and any Numeric data types source field of your data source DataTable object. At run time, the DataGridCheckColumn contains check boxes in each cell that have two states:

    checked: true for Boolean data type
    "True" for a String data type
    1 for a Numeric data type
    unchecked: false for Boolean data type
    ""(empty string) for a String data type
    0 for a Numeric data type
    A Click Event is raised when the cell is clicked, passing a System.EventArgs object, you can react to this event in your code.

    Syntax
    DataGridCheckColumn()

    Please read the DataGridColumns assembly documentation to learn more about the DataGridCheckColumn class provided events and class members.

    DataGrid Label Column Style

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

    The RustemSoft DataGridLabelColumn 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 DataGridLabelColumn raises a Cell event when the user clicks on a cell you can react to this event in your code.

    Syntax
    DataGridLabelColumn()

    Please read the DataGridColumns assembly documentation to learn more about the DataGridLabelColumn class provided events and class members.

    DataGrid TextEdit Column Style

    The RustemSoft DataGridTextEditColumn gives you a useful TextEdit Field control, which presents an edit area when user selects a cell of the DataGrid TextEdit Column on .NET DataGrid. When using the TextEdit you are automatically provided with a vertical scrollbar and the ability to put carriage returns in your data using the 'Enter' key. Also all general features, which any typical, contemporary word processor has, are provided. According to the nature of the DataGrid navigation 'Tab' characters are not supported by the DataGridTextEditColumn.
    This TextEdit field editor provides more flexibility by updating the TextEdit column to be used in a .NET DataGrid column.

    The DataGrid TextEdit Column TextEdit field editor is useful for showing short document contents, like Memos and emails.
    The DataGridTextBoxColumn provides several events, that enables you interact the events in your code.

    Syntax
    DataGridTextEditColumn()

    Please read the DataGridColumns assembly documentation to learn more about the DataGridTextEditColumn class provided events and class members.

    DataGrid DomainUpDown Column Style

    The RustemSoft DataGridDomainUpDownColumn represents a datagrid column style up-down control that displays string values. It allows you to show a DomainUpDown control in a Datagrid cell.
    The control displays in a datagrid 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 DataGrid 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
    DataGridDomainUpDownColumn()
    or
    DataGridDomainUpDownColumn(DataSource, DisplayMember)

    Parameters
    DataSource - a source for a DataGrid DomainUpDown column values list as System.Data.DataTable

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

    Please read the DataGridColumns assembly documentation to learn more about the DataGridDomainUpDownColumn class provided events and class members.

    DataGrid NumericUpDown Column Style

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

    Syntax
    DataGridNumericUpDownColumn()

    Please read the DataGridColumns assembly documentation to learn more about the DataGridNumericUpDownColumn class provided events and class members.

    DataGrid Picture Column Style

    The RustemSoft DataGridPictureColumn represents a datagrid picture column style for displaying an image.

    Usually the Picture column style 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 datagrid 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
    DataGridPictureColumn()

    Please read the DataGridColumns assembly documentation to learn more about the DataGridPictureColumn class provided events and class members.

    DataGrid Print Class

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

    Syntax
    DataGridPrint(PrintDocument1, DataGrid1, bBlackWhite)

    PrintDocument1 - System.Drawing.Printing.PrintDocument reusable object that sends output to a printer
    DataGrid1 - System.Windows.Forms.DataGrid 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 datagrid control has currently on your form.

    How to implement a .NET application with the DataGridPrint class? Please read the DataGridColumns assembly documentation to learn more about the DataGridPrint 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 DataGridColumns .NET assembly for a .NET DataGrid control on your Windows form. The first step that you will generally take is, you will add a reference to the DataGridColumns .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 DataGridColumns.
    In order to add the reference to DataGridColumns .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 DataGridColumnsTrial.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.DataGridColumns

    C#
    using RustemSoft.DataGridColumns;

    C++
    #using <DataGridColumnsTrial.dll>
    using namespace RustemSoft;

    Download the DataGridColumns .NET assembly code samples for VB.NET and C# that show how you can use the RustemSoft DataGrid Column styles in Windows Forms .NET datagrid.

    Please note you must use System.Data.DataSet or System.Data.DataTable or System.Data.DataView or System.Data.DataViewManager only as a DataSource of DataGrid control.

    @SoftTop Skater .NET Obfuscator 2.05 on CriticalFiles.com XMLFox Advance XML/XSD Editor 2.6 on Byte-Flow.com




    Copyright © 2001-2022 RustemSoft

    ODBC compliant data source such as SQL Server, ORACLE, MySQL and many more.
    You do not need programming knowledge to use the product. It is purposed at non-technical users who may be not familiar with XML. The interface is designed to promote a step by step approach and hide most of the technical issues.
    The more technically capable can enter SQL directly if needed to extract data for conversion. Also there are bunch of options for tailoring the XML output to meet most requirements. You can even write your own XSL and automatically transform the XML produced.
    There are two options available for integration into web sites or other systems. There is a GUI executable and a command line utility. Both of them allow execution of predefined transformations.
    XML Converter takes care of frequent XML creation with single, easy method support for exporting data to XML. The output file is a well-formed XML from a standard template, and may come (if you need) with a standard eXtensible Style Language (XSL) sheet to render the output to HTML-view using the well-known MS Internet Explorer? and a latest version of Netscape Navigator?. The XSL give you ability to extract, transform and render the content of an XML file. And now this specification is supported by popular of Internet browsers and you do not need a physical transformation your XML document into HTML files.