iOS Framework (for XCode Swift & Objective C)
UIDataGrid iOS Control

The Rustemsoft's UIDataGrid View XCode control seems a little better than the standard UITableView control. It provides a flexible and forceful way to represent a data source. You can extend the UIDataGrid View control in a number of ways to build custom behaviors into your iPad/iPhone apps. While you may design your own types of cells the XCode UIDataGrid View 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.
Beginning February 1, 2020 TouchControls iOS Framework includes 64-bit support, built with the iOS 8 SDK and Xcode 6.

Download demo-trial now!

TouchControls iOS Framework library from Rustemsoft LLC is Swift & Objective C software package specifically designed for Xcode developers. The library allows you to use all strengths of the Rustemsoft UIDataGrid control without waiving the user interface elements your customers need.
The UIDataGrid control provides a powerful and flexible way to display data in a tabular format. You can use the UIDataGrid control to show read-only views of a small amount of data, or you can scale it to show editable views of very large sets of data.

Order the TouchControls iOS Framework

Hot Queston

Read the TouchControls iOS Framework documentation

You can extend the UIDataGrid control in a number of ways to build custom behaviors into your iOS apps. For example, you can programmatically specify your own set of displayed columns, and you can create your own types of cells. You can easily customize the appearance of the UIDataGrid control by choosing among several properties.

DataGridView Columns .NET assembly
More about DataGridViewColumns.dll
Download DataGridViewColumns.dll
Order DataGridViewColumns.dll

Several types of data stores (JSON, plist, XML, and a mutable array object) can be used as a data source. The UIDataGrid control provides a user interface to this data sources, displays the tabular data in a scrollable grid, and allows for updates to the data source. In cases where the UIDataGrid is bound to a data source with a single table the data appears in simple rows and columns, as in a spreadsheet. The UIDataGrid control is one of the most useful and flexible controls for Xcode iOS development. As soon as the UIDataGrid control is set to a valid data source, the control is automatically populated, by creating columns and rows based on the columns objects structure you defined in your project's code.

By using the TouchControls Framework you can create your own set of DataGrid Column objects that defines custom column for the iOS UIDataGrid control and add them to the Grid Columns collection. 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 data source with the use of a UIPickerView Control, a Text Field view, a DateTime format Picker and other UIView controls.

Also we have built Xcode sample projects that describe the concepts and techniques that you can use to build UIDataGrid features into your apps.
Rustemsoft TouchControls Framework library contains the following DataGrid Columns:

  • DataGrid Button Column
  • DataGrid DatePicker Column
  • DataGrid Image Column
  • DataGrid Label Column
  • DataGrid Picker Column
  • DataGrid Slider Column
  • DataGrid Switch Column
  • DataGrid TextField Column
  • DataGrid TextView Column

  • DataGrid Button Column

    DataGridButtonColumn represents a data grid column that renders several buttons as DataGrid Button cells. The DataGridButtonColumn is just a collection that hosts DataGridButtonCell objects. It displays a button-like user interface (UI) for use in a UIDataGrid control.

    The DataGridButtonColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridButtonColumn has an associated DataGridButtonCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UIButton view control.

    To have the same button properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired button properties' values.

    To respond to user button taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the button column.


    You can use the rowIndex method's parameter to determine whether the click occurred in a button cell and not on the column header.

    It is possible to specify particular UIDataGrid datasource columns that should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridButtonColumn *colBtn = [[DataGridButtonColumn alloc] init];

    SWIFT
    var colBtn = DataGridButtonColumn()

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

    Example

    The following code example demonstrates how to use a DataGridButtonColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a button cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridButtonColumn *colBtn = [dgrid.Columns objectAtIndex:colIndex];
    DataGridButtonCell *cellBtn = [colBtn.Cells objectAtIndex:rowIndex];
    cellBtn.button.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as DataGridButtonColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as DataGridButtonCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid Button Column class provided events and class members.


    DataGrid DatePicker Column

    DataGridDatePickerColumn represents a data grid column that renders several DatePickers as DataGrid DatePicker cells. The DataGridDatePickerColumn is just a collection that hosts DataGridDatePickerCell objects. It displays a DatePicker-like user interface (UI) for use in a UIDataGrid control.

    The DataGridDatePickerColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridDatePickerColumn has an associated DataGridDatePickerCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UIDatePicker view control.

    To have the same DatePicker properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired DatePicker properties' values.

    To respond to user DatePicker taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the DatePicker column.


    Use rowIndex parameter method to determine whether the click was in a DatePicker cell and not on the column header.

    You can select the specific columns only from the UIDataGrid datasource which should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridDatePickerColumn *colPkr = [[DataGridDatePickerColumn alloc] init];

    SWIFT
    var colPkr = DataGridDatePickerColumn()

    Example

    The following code example demonstrates how to use a DataGridDatePickerColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a DatePicker cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridDatePickerColumn *colPkr = [dgrid.Columns objectAtIndex:colIndex];
    DataGridDatePickerCell *cellPkr = [colPkr.Cells objectAtIndex:rowIndex];
    cellPkr.DatePicker.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as border="0">DataGridDatePickerColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as border="0">DataGridDatePickerCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid DatePicker Column class provided events and class members.


    DataGrid Image Column

    DataGridImageColumn represents a data grid column that renders several Images as DataGrid Image cells. The DataGridImageColumn is just a collection that hosts DataGridImageCell objects. It displays a image-like user interface (UI) for use in a UIDataGrid control.

    The DataGridImageColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridImageColumn has an associated DataGridImageCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UIImage view control.

    To have the same Image properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired Image properties' values.

    To respond to user Image taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the Image column.


    You can use the rowIndex method's parameter to determine whether the click occurred in a Image cell and not on the column header.

    It is possible to specify particular UIDataGrid datasource columns that should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridImageColumn *colImg = [[DataGridImageColumn alloc] init];

    SWIFT
    var colImg = DataGridImageColumn()

    Example

    The following code example demonstrates how to use a DataGridImageColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a Image cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridImageColumn *colImg = [dgrid.Columns objectAtIndex:colIndex];
    DataGridImageCell *cellImg = [colImg.Cells objectAtIndex:rowIndex];
    cellImg.Image.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as DataGridImageColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as DataGridImageCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid Image Column class provided events and class members.


    DataGrid Label Column

    DataGridLabelColumn represents a data grid column that renders several Labels as DataGrid Label cells. The DataGridLabelColumn is just a collection that hosts DataGridLabelCell objects. It displays a Label-like user interface (UI) for use in a UIDataGrid control.

    The DataGridLabelColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridLabelColumn has an associated DataGridLabelCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UILabel view control.

    To have the same Label properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired Label properties' values.

    To respond to user Label taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the Label column.


    Use rowIndex parameter method to determine whether the click was in a Label cell and not on the column header.

    It is possible to specify particular UIDataGrid datasource columns that should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridLabelColumn *colLbl = [[DataGridLabelColumn alloc] init];

    SWIFT
    var colLbl = DataGridLabelColumn()

    Example

    The following code example demonstrates how to use a DataGridLabelColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a Label cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridLabelColumn *colLbl = [dgrid.Columns objectAtIndex:colIndex];
    DataGridLabelCell *cellLbl = [colLbl.Cells objectAtIndex:rowIndex];
    cellLbl.Label.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as DataGridLabelColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as DataGridLabelCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid Label Column class provided events and class members.


    DataGrid Picker Column

    DataGridPickerColumn represents a data grid column that renders several Pickers as DataGrid Picker cells. The DataGridPickerColumn is just a collection that hosts DataGridPickerCell objects. It displays a Picker-like user interface (UI) for use in a UIDataGrid control.

    The DataGridPickerColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridPickerColumn has an associated DataGridPickerCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UIPicker view control.

    To have the same Picker properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired Picker properties' values.

    To respond to user Picker taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the Picker column.


    You can use the rowIndex method's parameter to determine whether the click occurred in a Picker cell and not on the column header.

    You can select the specific columns only from the UIDataGrid datasource which should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridPickerColumn *colPkr = [[DataGridPickerColumn alloc] init];

    SWIFT
    var colPkr = DataGridPickerColumn()

    Example

    The following code example demonstrates how to use a DataGridPickerColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a Picker cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridPickerColumn *colPkr = [dgrid.Columns objectAtIndex:colIndex];
    DataGridPickerCell *cellPkr = [colPkr.Cells objectAtIndex:rowIndex];
    cellPkr.Picker.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as DataGridPickerColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as DataGridPickerCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid Picker Column class provided events and class members.


    DataGrid Slider Column

    DataGridSliderColumn represents a data grid column that renders several sliders as DataGrid Slider cells. The DataGridSliderColumn is just a collection that hosts DataGridSliderCell objects. It displays a Slider-like user interface (UI) for use in a UIDataGrid control.

    The DataGridSliderColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridSliderColumn has an associated DataGridSliderCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UISlider view control.

    To have the same Slider properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired Slider properties' values.

    To respond to user Slider taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the Slider column.


    Use rowIndex parameter method to determine whether the click was in a Slider cell and not on the column header.

    It is possible to specify particular UIDataGrid datasource columns that should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridSliderColumn *colSld = [[DataGridSliderColumn alloc] init];

    SWIFT
    var colSld = DataGridSliderColumn()

    Example

    The following code example demonstrates how to use a DataGridSliderColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a Slider cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridSliderColumn *colSld = [dgrid.Columns objectAtIndex:colIndex];
    DataGridSliderCell *cellSld = [colSld.Cells objectAtIndex:rowIndex];
    cellSld.Slider.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as DataGridSliderColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as DataGridSliderCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid Slider Column class provided events and class members.


    DataGrid Switch Column

    DataGridSwitchColumn represents a data grid column that renders several Switchs as DataGrid Switch cells. The DataGridSwitchColumn is just a collection that hosts DataGridSwitchCell objects. It displays a Switch-like user interface (UI) for use in a UIDataGrid control.

    The DataGridSwitchColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridSwitchColumn has an associated DataGridSwitchCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UISwitch view control.

    To have the same Switch properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired Switch properties' values.

    To respond to user Switch taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the Switch column.


    You can use the rowIndex method's parameter to determine whether the click occurred in a Switch cell and not on the column header.

    You can select the specific columns only from the UIDataGrid datasource which should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridSwitchColumn *colSwh = [[DataGridSwitchColumn alloc] init];

    SWIFT
    var colSwh = DataGridSwitchColumn()

    Example

    The following code example demonstrates how to use a DataGridSwitchColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a Switch cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridSwitchColumn *colSwh = [dgrid.Columns objectAtIndex:colIndex];
    DataGridSwitchCell *cellSwh = [colSwh.Cells objectAtIndex:rowIndex];
    cellSwh.Switch.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as DataGridSwitchColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as DataGridSwitchCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid Switch Column class provided events and class members.


    DataGrid TextField Column

    DataGridTextFieldColumn represents a data grid column that renders several TextFields as DataGrid TextField cells. The DataGridTextFieldColumn is just a collection that hosts DataGridTextFieldCell objects. It displays a TextField-like user interface (UI) for use in a UIDataGrid control.

    The DataGridTextFieldColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridTextFieldColumn has an associated DataGridTextFieldCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UITextField view control.

    To have the same TextField properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired TextField properties' values.

    To respond to user TextField taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the TextField column.


    Use rowIndex parameter method to determine whether the click was in a TextField cell and not on the column header.

    It is possible to specify particular UIDataGrid datasource columns that should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridTextFieldColumn *colTxt = [[DataGridTextFieldColumn alloc] init];

    SWIFT
    var colTxt = DataGridTextFieldColumn()

    Example

    The following code example demonstrates how to use a DataGridTextFieldColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a TextField cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridTextFieldColumn *colTxt = [dgrid.Columns objectAtIndex:colIndex];
    DataGridTextFieldCell *cellTxt = [colTxt.Cells objectAtIndex:rowIndex];
    cellTxt.TextField.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as DataGridTextFieldColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as DataGridTextFieldCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid TextField Column class provided events and class members.


    DataGrid TextView Column

    DataGridTextViewColumn represents a data grid column that renders several TextViews as DataGrid TextView cells. The DataGridTextViewColumn is just a collection that hosts DataGridTextViewCell objects. It displays a TextView-like user interface (UI) for use in a UIDataGrid control.

    The DataGridTextViewColumn class is a specialized type of the UIDataGrid Column used to logically host cells that respond to simple user input. A DataGridTextViewColumn has an associated DataGridTextViewCell in every UIDataGrid row that intersects it. Each cell supplies a user interface (UI) that is similar to a UITextView view control.

    To have the same TextView properties (colors, fonts, etc.) for every cell, set the cellTemplate property to the desired TextView properties' values.

    To respond to user TextView taps, handle the UIDataGrid's datagridCellTapped event. In the event methods, you can use the colIndex method's parameter to determine whether the click occurred in the TextView column.


    You can use the rowIndex method's parameter to determine whether the click occurred in a TextView cell and not on the column header.

    You can select the specific columns only from the UIDataGrid datasource which should be displayed. The datasource for your data grid may have quite a few data columns. But you may not want to display the information from all of them. The dataFieldIndex property represents the ref number of the corresponding data field in the datasource bound to the datagrid.

    Syntax
    OBJECTIVE-C
    DataGridTextViewColumn *colTxt = [[DataGridTextViewColumn alloc] init];

    SWIFT
    var colTxt = DataGridTextViewColumn()

    Example

    The following code example demonstrates how to use a DataGridTextViewColumn to perform actions on particular rows. In this example, a UIDataGrid's datagridCellTapped event method first determines whether a click is on a TextView cell, then retrieves a business object associated with the row.

    OBJECTIVE-C
    // Event-handling procedure that fires when a datagrid cell is tapped
    - (void)datagridCellTapped:(UIDataGrid *)datagrid rowIndex:(int)rowIndex colIndex:(int)colIndex value:(NSString *)value
    {
    DataGridTextViewColumn *colTxt = [dgrid.Columns objectAtIndex:colIndex];
    DataGridTextViewCell *cellTxt = [colTxt.Cells objectAtIndex:rowIndex];
    cellTxt.TextView.backgroundColor = [UIColor redColor];
    }

    SWIFT
    // Event-handling procedure that fires when a datagrid cell is tapped
    func datagridCellTapped(datagrid: UIDataGrid, rowIndex: Int, colIndex: Int, value: NSString)
    {
    var col = datagrid.Columns.objectAtIndex(colIndex) as DataGridTextViewColumn
    var cell = col.Cells.objectAtIndex(rowIndex) as DataGridTextViewCell
    cell.backgroundColor = UIColor(red:1, green:1, blue:1, alpha:0.5)
    }

    Please read the TouchControls iOS Framework documentation to learn more about the DataGrid TextView Column class provided events and class members.



    Add TouchControls library to your Xcode project

    Suppose you are building a project using Xcode, and you decide that you want to start consuming Rustemsoft TouchControls library for a UIDataGrid control and/or UIChart control on your iPhone/iPad app. The first step that you will generally take is you will add a reference to the TouchControls library, which is residing in some directory on your Mac hard drive. Xcode will then add a new item in Project Navigator, and it will create a row node called 'TouchControls.framework'.
    In order to add the Rustemsoft TouchControls library please follow the steps:

    1. In the Project Navigator, select your project.

    2. Select your target.

    3. Select the "General" tab.

    4. Open "Embedded Binaries" expander.

    5. Click the + button.

    6. Select the TouchControls framework.

    The reference to the Rustemsoft TouchControls Swift/Objective-C library is a requirement and must be added to a project before the classes and objects in the library can be used.

    Download the Rustemsoft TouchControls library code samplesfor Swift & Objective C that show how you can use the RustemSoft UIDataGrid Columns in your Xcode project.

    About Rustemsoft

    Rustemsoft works on things that matter. Rustemsoft LLC is a creative ISV (Independent Software Vendor) specializes in intelligent software solutions for Xcode programmers, XML designers, and .NET developers. The smart people and the smart technologies taking on the complex tasks. Not just imagining. Doing. Rustemsoft works.

    Copyright © 2001-2024 Rustemsoft LLC

    Skater .NET Obfuscator

    TouchControls iOS Framework

    XMLFox

    Home

    Products

    Downloads

    Articles

    Company

    Support