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
955
CSS on a column in the AddNewRow
posted

How can I set the CSS for a particular column in the AddNewRow? For the rows in the grid, I can use e.Row.Items.FindItemByKey("Status_ID").CssClass = "Editable" in the InitializeRow, but is there a way to do the same for a particular column in the AddNewRow itself?

Parents
No Data
Reply
  • 11095
    Offline posted

    Hello,

    Intialize event of the ClientEvents can be handled.  

    [code]

    function WebDataGrid1_OnInitialized(sender, eventArgs) {
    var rowAdding = sender.get_behaviors().get_editingCore().get_behaviors().get_rowAdding(),
    row = rowAdding.get_row(),
    cell = row.get_cellByColumnKey("Phone");

    cell.get_element().classList.add("custom-class");
    }

    [/code]

    I have attached sample to demonstrate this.

    Let me know if I may be of further assistance.

    ApplyCustomClassOnAddNewRow.zip
Children
No Data