Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1530
Infragistics editable grid
posted

Hi,

I have an editable infragistics grid which has add row , delete row and row updating property set.

I want to disable or make one column read-only so that user does not update it at any cost, when user clicks on Add row. Let the column value be 0 or -1 by default.

How can I achieve this?

2. Is there a possibility to get rid of Done Cancel buttons while editing the grid and enable just inline row editing?

We are using infragistics version - 20132.2364.

Features and grid options configured :

_$calendarImportGrid.igGrid({

height: "310px",

width: "100%",

autoGenerateColumns: false,

alternateRowStyles: false,

virtualization: true,

virtualizationMode: "continuous",

autoCommit: true,

primaryKey: "RowIdentifier",

features: [

{

name: 'Updating',

enableAddRow: true,

enableDeleteRow: true,

editMode: 'row',

generatePrimaryKeyValue: function (evt, ui) {

ui.value = _getTempKey();

}

},

{

name: "Selection",

mode: "row",

multipleSelection: false,

activation: true

},

{

name: "Sorting",

applySortedColumnCss: false,

columnSorting: function (evt, ui) {

gridHelper.onColumnSorting(_$calendarImportGrid, ui, _initializePlanningCalendarGrid, "RowIdentifier");

return false;

}

},

{

name: "Resizing"

}

],

Thanks,

Kiran

  • 2525
    Verified Answer
    posted

    Hello Kiran,

    You can make a column read only by setting the readOnly property to true within the columnSettings array of the Updating feature. Here'a link to our API with more info on the readOnly property:

    http://help.infragistics.com/jQuery/2015.2/ui.iggridupdating#options:columnSettings.readOnly

    You can set a default value by using the rowAdded event and write to the column of the newly added row with the updateRow method. Here's a link to our API with more info on the rowAdded event and updateRow method: 

    http://help.infragistics.com/jQuery/2015.2/ui.iggridupdating#events:rowAdded

    http://help.infragistics.com/jQuery/2015.2/ui.iggridupdating#methods:updateRow

    You can remove the done cancel buttons by setting the showDoneCancelButtons property to false. Here's a link to our API with more info on the property:

    http://help.infragistics.com/jQuery/2015.2/ui.iggridupdating#options:showDoneCancelButtons