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
3475
Disable a Column in JavaScript
posted

Infragistics4.Web.v11.1, Version=11.1.20111.1006

Microsoft .NET Framework Verion 4.0.30319 SP1Rel

I need to disable a column in the WebDataGrid based on a value in a DDL.  If the user selects CarbonCopy in the DDL, I check the BoundCheckBoxField for all the rows in the grid.  Then I need to disable the column because the user cannot uncheck these fields.  I have not been able to figure out how to get at the ReadOnly property for the column.  FYI - I cannot use the CellValueChanging event to cancel the eventArgs because I am setting the value in the same function.  Here is my code...can you help?   

 

 

 

 

 

 

 

 

if

 

 

((ddlSigningMethod.options(ddlSigningMethod.selectedIndex).value == 'CarbonCopy') ) {

 

 

var wdgDocuments = $find('<%= wdgDocuments.ClientID %>');

 

 

// Spin though the Document Grid, checking all the Selected checkboxes

 

 

for (var i = 0; i < wdgDocuments.get_rows().get_length(); i++) {

selectedDocument = wdgDocuments.get_rows().get_row(i).get_cellByColumnKey(

 

"HasSignerAssociatedWithDocument");

selectedDocument.set_value(

 

true);

}

 

 

// These do not work to help me disable the row

wdgDocuments.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().get_columnSettingFromKey(

 

"HasSignerAssociatedWithDocument")

wdgDocuments.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().get_columnSettings()

}

Parents
No Data
Reply
  • 33839
    Suggested Answer
    posted

    Hi IntegraSys76,

    Technically it is not possible to set the read only property of a column setting for cell editing.  It would require going back to the server to accomplish this.  However, with checkbox columns, we scan for the column setting in the initialization and set _editableCheckbox on the column.  When it is set to false, clicking on the checkboxes will not switch the value.  This is what I would suggest doing in your case.

    regards,
    David Young 

Children