Set default value during Edit ← Datagrid Edit set_col_default() function works great for setting default values when add new records. To set the default value for edit existing records, use beforeEditRow event. Be sure to set default only when the value is blank otherwise any populated values entered by users would be overwritten.