This project is read-only.

Getting Started

DropDownList

Grid

TabStrip

TreeView

Window

Comming Soon

  • ComboBox

 

 

hideColumn

Description

Hide a column in the grid.

Sample

$('#MyGrid').data('tGrid').hideColumn(1);
	

showColumn

Description

Show a column in the grid.

Sample

$('#MyGrid').data('tGrid').showColumn(1);
	

columnCellTextEquals

Description

Search a cell in a grid column with text equal to the text passed in.

Sample

// Search the second column for a cell that contains the value: Black.
var rowIndex = $('#MyGrid').data('tGrid').columnCellTextEquals({ column: 1,text: 'Black' });
	

enableClientSort

Description

Enable client side sorting in the grid.

Sample

$('#MyGrid').data('tGrid').enableClientSort();
	

hideGroupColumns

Description

Hide columns that are grouped.

Sample

$('#MyGrid').data('tGrid').enableClientSort();
	

showCellAsTextBox

Description

Show a cell as a textbox in the grid. Only availabe for grids that are populated using AJAX data binding or client-side data binding.

Sample

$('#MyGrid').data('tGrid').showCellAsTextBox({ 
    row: 1, 
    column: 2, 
    textBoxId: 'textBox_1_2', 
    onChange: function(textBox, rowData, oldValue, newValue) {
        if (rowData.NotNegative == true) {
            if (rowData.value < 0) {
                textBox.css('color', 'red');
            }
            else {
                textBox.css('color', 'black');
            }
        }
    }, 
    formatDisplay: function(textBox, rowData) {
        if (rowData.NotNegative == true) {
            if (rowData.value < 0) {
                textBox.css('color', 'red');
            }
        }
    },
    formatPersist: function(textBox, rowData) {
        return parseInt(textBox.val());
    }
});
	

showCellAsDropDown

Description

Show a cell as a dropdown in the grid. Only availabe for grids that are populated using AJAX data binding or client-side data binding.

Sample

$('#PersonGrid').data('tGrid').showCellAsDropDown({
        row: 1,
        column: 1,
        options: {
            textField: 'Color',
            valueField: 'Id',
            data: [
                { Id: '1',Color: 'Brown' },
                { Id: '2',Color: 'Black' },
                { Id: '3',Color: 'Red' },
                { Id: '4',Color: 'Blond' }
            ]
        },
        textField: 'HairColor',
        valueField: 'HairColorId',
        onChange: function (o) {
            if(typeof console!="undefined") { console.log(o); }
            o.cancel=(o.newText=='Blond');
        }
    }
);
	

Last edited Dec 23, 2011 at 4:18 PM by jddevight, version 8

Comments

No comments yet.