The name of the repo says that this is an EXTRA of my Beloved https://github.com/volkanceylan/Serenity platform
It is just some useful utilities and some extra functionalities like
- Showing lookup text instead of ID value in the grid.
- Automatic width adjustment of grid columns.
- Added functionality to make a detail grid editable (inline)
- Added some useful functions in q (Not Q).
- Audit Log in a single Table and a nice viewer.
- Compare the database schema with the entity/row
- Generating database migration from entity/row
- Added some editors
- Grid Item Picker Editor
- AutoCompleteEditor
- ColorEditor
- DateTimePickerEditor
- EmptyLookupEditor
- StaticTextBlock
- Copy the Modules/_Ext folder from the SerExtraNet8 project and place it accordingly.
- Add following line in Modules/Common/ScriptInit.ts
Q.Config.rootNamespaces.push('_Ext');
- If you want to apply Serenity.Extra CSS, then you could copy then add a line in appsettings.bundles.json
"~/Content/site/site.ext.css"
- If you want to use code generator custom templates, then follow sergen.json file from SerExtraNet8 project
- See LanguageGrid.ts and LanguageDialog.ts for example.
- Copy the Modules/_Ext folder from the SerExtraESM project and place it accordingly.
- Copy the wwwroot/lib/_Ext folder from the SerExtraESM project
- Add following line in Modules/Common/ScriptInit.ts
Q.Config.rootNamespaces.push('_Ext');
- If you want to apply Serenity.Extra CSS, then you could add a line in appsettings.bundles.json
"~/lib/_Ext/ExtStyles.css"
- If you want to use code generator custom templates, then follow sergen.json file from SerExtraESM project
- See LanguageGrid.ts and LanguageDialog.ts for example.
- Copy the Modules/_Ext folder from the SerExtraNet5 project and place it accordingly.
- Copy the wwwroot/Modules folder from the SerExtraNet5 project
- Add the following line in ScriptInitialization.ts
Q.Config.rootNamespaces.push('_Ext');
- If you want to apply Serenity.Extra css then you could add a line in appsettings.bundles.json
"~/Modules/_Ext/ExtStyles.css"
- Install the NuGet Package Serenity.Extra
- If you want to apply Serenity.Extra CSS, then you could add a line in Content\site\CssBundles.json
"~/Modules/_Ext/ExtStyles.css"
- Add [LookupScript("Administration.User")] on UserRow
- Add the following line in ScriptInitialization.ts
Q.Config.rootNamespaces.push('_Ext');
Change Base/Super classes of Dialog.ts and Grid.ts using the following mappings
Serenity Default | _Ext |
---|---|
Serenity.EntityGrid | _Ext.GridBase |
Serenity.EntityDialog | _Ext.DialogBase |
Common.GridEditorBase | _Ext.GridEditorBase |
Common.EditorDialogBase | _Ext.EditorDialogBase |
add the following code to Grid.ts
protected getSlickOptions() {
let opt = super.getSlickOptions();
opt.editable = true;
return opt;
}
use q.hideField(this.form.SomeField)
.
use Serenity.EditorUtils.setReadOnly(this.form.SomeField, true);
call this.setReadOnly(true);
anywhere in your dialog.
Initialize detail editor by using q.initDetailEditor(this, this.form.someDetailField)
in dialog's constructor() OR onDialogOpen() overload
Then you should be able to access parent dialog like this.parentEditor.parentDialog
Make sure that you have declared form in parent/master dialog as public