/// <summary> /// Handles invocation of RowSetDefaultValues events /// </summary> internal void DoRowSetDefaultValuesEvent( GridPanel panel, GridRow row, NewRowContext context) { if (RowSetDefaultValues != null) { GridRowSetDefaultValuesEventArgs ev = new GridRowSetDefaultValuesEventArgs(panel, row, context); bool loading = row.Loading; row.Loading = true; try { RowSetDefaultValues(this, ev); } finally { row.Loading = loading; } } }
private void gridDevice_RowSetDefaultValues(object sender, GridRowSetDefaultValuesEventArgs e) { if (e.NewRowContext == NewRowContext.RowInit) { GridRow row = e.GridRow; row.Cells[0].Value = "Mới"; row.Cells[1].Value = Device.DefaultImageKey; row.Cells[2].Value = Device.DefaultName; row.Cells[3].Value = null; } }