Giter Site home page Giter Site logo

serenity-is / serenity Goto Github PK

View Code? Open in Web Editor NEW
2.6K 223.0 794.0 124.31 MB

Business Apps Made Simple with Asp.Net Core MVC / TypeScript

Home Page: https://serenity.is

License: MIT License

JavaScript 20.09% CSS 4.28% C# 53.95% Batchfile 0.01% TypeScript 21.67% Smalltalk 0.01%
c-sharp visual-studio aspnetcore aspnet dotnet-core dotnet6 serenity serenity-platform typescript application-platform

serenity's People

Contributors

alperanq avatar arifsamitekinkaya avatar ariftekinkaya avatar awesomegithubusername avatar dependabot[bot] avatar dfaruque avatar ducthanhnguyen avatar estrusco avatar furkanevran avatar fzhenmei avatar gguadalupe avatar gitter-badger avatar hannesb avatar jdong001 avatar lishewen avatar marcobisio avatar minhhungit avatar osmanaslancan avatar raptortrap avatar rolembergfilho avatar sercan-karadeniz avatar serenity-premium avatar skuzzle-uk avatar thsmr avatar victortomaili avatar volkanceylan avatar volkankalkan avatar welcometoall avatar wezmag avatar wldkrd1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serenity's Issues

AuditLog and CaptureLog example

I checked up on serenity code about logging functions. I guess serenity has matured Audit Log and Capture Log abilites. Is there any example about these?

Thank you

User personal page

How to realize User personal page. Where he can change password, remind forgot password and ... ?

"Editor" error message while creating an Editor For Movie Cast List

Hi,

I have encountered 2 error message while trying to create Editor List similar to MovieCastEditor :

  1. CS0104 'Editor' is an ambiguous reference between 'System.ComponentModel.EditorAttribute' and 'Serenity.EditorAttribute' TestFeature.Script ../PermissionCheckEditor.cs 11
    Severity Code Description Project File Line
  2. CS0104 'Editor' is an ambiguous reference between 'System.ComponentModel.EditorAttribute' and 'Serenity.EditorAttribute' TestFeature.Script ../PermissionModuleEditor.cs 12

The error show up after creating the new editor type and rebuild solution, before proceeding to transform all t4 templates. I had saw the same error message when using V1.5+ and had caused some issues which makes me decided to work on the latest v1.6.3, but still same error message appear. The visual studio using now is 2015 community edition.

Thanks to advise for the error message!

DynamicScripts

How to pass parameter inside lookupscript?

For example:
I want to do filtering by product category. Want to pass categoryID over lookup and get back only products from this category

Caching

Is sessionState as "SQL server" supported?
I mean standard aspStateDB base in SQL server to store session between IIS instances in farm.

Now farm balance load between servers and Authorization lost very often

DateEditor assign date issue

Hi,

I want to assign date value to a field when opening dialog. This my code:

public class SomeDialog : EntityDialog<SomeRow>
{
    SomeForm form;

    public SomeDialog()
    {
        form = new SomeForm(this.idPrefix);
    }

    protected override void LoadEntity(SomeRow entity)
    {
        base.LoadEntity(entity);
        if (IsNew)
            form.DateTimeTypeField.Value = JsDate.Today.ToDateString();// OR Datetime.Now.ToDateString() etc
    }
}

When dialog opens DatetimeTypeField always shows 1.1.1970 value.

To-Do List for Serene

  • Find a way to handle SQL server 2014+ LocalDB errors (edit web.config with powershell?)
  • Add some graphics, stats to dashboard
  • Make parts of Serene template as NuGet packages (easier to update)
  • Category / department etc based permissions sample
  • Add inline editing sample for in-memory grid editor
  • Row ordering sample for full table
  • Row ordering sample for groups in table
  • Row ordering sample for in-memory grid editor

Custom field changes in web farm environments

When custom field definitions change, we update rows in the web server.

But other servers are not aware of this change.

We should notify them by using TwoLevelCache generations etc.

To-Do List for Serenity

  • Code generator should produce code compatible with T4 templates (same location, contents)
  • Enum types script (so won't have to run T4, but not sure if it is a good idea yet)
  • ColumnsBundle, FormBundle, TemplateBundle in one combined ServerMetadata?
  • Bundle of Bundles:
  • Optional Typescript support
  • Increase Test Coverage
  • Remove dependency on jQuery UI, or use a custom subset of it.
  • Use Bootstrap where possible
  • Switch to flexbox model for form layouts (IE9+?)
  • Look for an alternative to jQuery Validation.
  • Split theme and layout for Serenity widgets, offer a way to exclude default theme
  • Give better error message when Row type used with a LookupEditor attribute doesn't have a LookupScipt attribute
  • Generate code for multiple rows
  • TimeSpan editor
  • Another kind of captcha
  • Add criteria enum overloads
  • DateTime2 support
  • Expandable categories in form
  • Evaluate SlickGrid grouping option
  • Evaluate SlickGrid footer & totals option
  • Partial validation summary in toastr message
  • Use Roslyn or DTE for code generation, avoid requirement to build, auto transform if possible
  • Single Page Application model

Localization issue

Hi,

I deployed my project to public web server. I changed globalication configuration:

but always welcome message and some other texts stay original.

I realized that [Web project]Project.Texts strings always show original (english) format. How can i change to turkish language.

Find a better name of UnassignedReadErrors

When this property is set on Row, and a field whose value is not assigned (when row is in tracking mode) read through Field.AsObject[row] etc, this method throws an InvalidOperationException, as field value is undefined.

Need a better name for it.

Also it is not cloned yet, on Row.Clone

Exporting form data into flat file or excel

Hi,

I would like to write a function on exporting form data (i.e. Orders) into a flat file or excel upon clicking the save button, where can I insert the export function coding at in order to detect and trigger when the form is successfully saved?

Thanks to advise!

EntityGrid get current user/role

hello, first of all congratulations for your work, is ti possibile retrieve the current user and roles int the project serene.script?
can you help me?
thank you

TwoLevelCache multiple table dependency

It should be able to handle cache validation for data that depends on more than one table

Even better, should work with something similar to CacheDependency.

Cascading dropdown display

Hello sir I have four table, course, class, subject and topic. Class has ref. of CourseId, Subject has ref. ClassId, Topic has ref. of SubjectId. I have generated all form and customize it work fine, but there is additional requirement in topic popup has facility to add course, class same as Nothwind=>Product=>Product Name click => Display Supplier and Category like functionality.
Class name filter on Course dropdown.
Plz help me.

new development lookup cascadedfrom attr didnot work on not Row based (with diffrent manuel class) lookup script

Hi @volkanceylan ,

Here, manuel scripts,

    public static IDynamicScript SchemaTable =
        new DbLookupScript<SchemaTableItem>("Common.SchemaTable",
            getItems: c =>
            {
                c.Open();
                return SqlSchemaInfo.GetTableNames(c).Select(t => new SchemaTableItem { SchemaTable = ((t.Item1 != null) ? string.Format("{0}.{1}", t.Item1, t.Item2) : string.Format("{0}", t.Item2)) }).ToList();
            })
        {
            IdField = "SchemaTable",
            TextField = "SchemaTable",
            Expiration = TimeSpan.FromHours(-1)
        };

    public static IDynamicScript SchemaTableField =
        new DbLookupScript<SchemaTableFieldItem>("Common.SchemaTableField",
            getItems: c =>
            {
                c.Open();
                var r = new List<SchemaTableFieldItem>();
                foreach (var t in SqlSchemaInfo.GetTableNames(c))
                {
                    r.AddRange(SqlSchemaInfo.GetTableFieldNames(c, t.Item1, t.Item2, true)
                        .Select(x => new SchemaTableFieldItem { FieldName = string.Format("{0}", x), SchemaTable = ((t.Item1 != null) ? string.Format("{0}.{1}", t.Item1, t.Item2) : string.Format("{0}", t.Item2)) }));
                }

                return r;
            })
    {
        IdField = "FieldName",
        TextField = "FieldName",
        Expiration = TimeSpan.FromHours(-1)
    };

public class SchemaTableItem
{
    public string SchemaTable { get; set; }
}

public class SchemaTableFieldItem
{
    public string FieldName { get; set; }
    public string SchemaTable { get; set; }
}

/// on Row

    [DisplayName("Primary Table"), Size(30), NotNull, LookupEditor("Common.SchemaTable")]
    public String PrimaryTable
    {
        get { return Fields.PrimaryTable[this]; }
        set { Fields.PrimaryTable[this] = value; }
    }

    [DisplayName("Primary Field"), Size(30), NotNull, LookupEditor("Common.SchemaTableField", CascadeFrom = "PrimaryTable")]
    public String PrimaryField
    {
        get { return Fields.PrimaryField[this]; }
        set { Fields.PrimaryField[this] = value; }
    }

its showing the table lookup , but itsnt showing tables columns, when table lookup editor value changed no error,,
image

same thing working working on row class lookup script.
image

also old manuel editor is working

public class TableFieldEditor : LookupEditorBase<SchemaTableFieldItem>
{
    private readonly CascadedWidgetLink<LookupEditor> _schemaTableLink;

    public TableFieldEditor(jQueryObject container)
        : base(container)
    {
        _schemaTableLink = new CascadedWidgetLink<LookupEditor>(this, p => this.SchemaTable = p.Value);
    }

    protected override string GetLookupKey()
    {
        return SchemaTableFieldItem.LookupKey;
    }

    protected override IEnumerable<SchemaTableFieldItem> GetItems(Lookup<SchemaTableFieldItem> lookup)
    {
        return base.GetItems(lookup).Where(x => x.SchemaTable == SchemaTable);
    }

    [Option]
    public string SchemaTableField
    {
        get { return _schemaTableLink.ParentID; }
        set { _schemaTableLink.ParentID = value; }
    }

    private string schemaTable;

    [Option]
    public string SchemaTable
    {
        get
        {
            return schemaTable;
        }
        set
        {
            if (schemaTable != value)
            {
                schemaTable = value;
                Value = null;
                UpdateItems();
            }
        }
    }
}

[Imported, Serializable, PreserveMemberCase]
public partial class SchemaTableFieldItem
{
    [InlineConstant]
    public const string IdProperty = "FieldName";
    [InlineConstant]
    public const string NameProperty = "FieldName";
    [InlineConstant]
    public const string LocalTextPrefix = "Common.SchemaTableField";
    [InlineConstant]
    public const string LookupKey = "Common.SchemaTableField";

    public static Lookup<SchemaTableFieldItem> Lookup { [InlineCode("Q.getLookup('Common.SchemaTableField')")] get { return null; } }

    public String FieldName { get; set; }
    public String SchemaTable { get; set; }

    [Imported, PreserveMemberCase]
    public static class Fields
    {
        [InlineConstant]
        public const string FieldName = "FieldName";
        [InlineConstant]
        public const string SchemaTable = "SchemaTable";
    }
}

}

Role permission functionality step by step guide

Hello sir,

Please give me step by step process of edit role permission functionality in Administration section and how to disable edit permission button by specific role. Where to set button text? I've tried to set button text in site.texts.tr.json file but it can't works and in this file contain other language text set so i can't understand how to translate this text to source language(means set language).

Please help me step by step guide.

New auto generated code not work correctly sometimes

Hi JaiQ
I'm trying to add a Subject form by sergen.exe code auto generated but i can't work properly. The browser console show that 'Uncaught TypeError: IntraMVC.CourseDB.SubjectGrid is not a function. after that i delete Subject folder in CourseDB from IntaMVC.Script and IntraMVC.Web and agian run sergen.exe and code generated. This procedure try 3 to 4 times after it work fine.

Please tell me the exact problem how misbehave it. How can i fix this?

Serene template won't F5 out of the box.

I'm using VS2015, I installed the template and hit F5. It appears that the script project is not built when launching the web project. Under solution configuration if you make the script project a dependency of the web project it should alleviate this.

Tab/New Entity behaviour since 1.6.5?

Hi Volkan :)

I'm sorry but I'm not sure if an update broke things... I was developing on 1.6.4 on Friday and then updated this morning when VS said there were updates available.

Since then the Add New behaviour on tab pages seems to open a new master page instead of a new detail page?

For example in Customer --> Edit Customer(CustomerName) --> Orders Tab : when you click "New Order", the New Order dialog opens with OrderForm on a "Customer" tab and a blank "Orders" tab and the New Order Detail does the same thing.

customers

Is this a bug or did I break it :)

Thanks s

To-Do List for Serenity Developer Guide

Some of tasks in this list are planned, while others are just ideas on what can be done.

  • Movie Tutorial Sample
    • Master/Detail In Memory Editing for Cast
    • Show movies an actor played in as a tab
    • Person / movie main image upload ability
    • Person / movie multiple image upload ability
    • Front page for viewing movies (/title/123213/lord-of-the-rings)
    • Front page for viewing persons (/name/5454/keanu-reeves)
  • URL Shortener Sample
    • Service to register short URLs
    • List / edit interface for short URLs
    • API Key / Registration for customers
  • Help Desk / Task Management Sample
    • Task
    • Issue (Ticket)
    • Work Item Linking
    • Teams
    • Automatic assignment with priority
    • Gantt Chart?
    • Workflow Management and Process Template?
  • Background Task Sample
    • Bulk Mail Server
  • Configuration Editor Sample
    • Declaring Settings
    • Editing Interface for Settings
    • Handling Different Setting Scopes
  • Dynamic Entities / Fields
    • Adding Custom Fields To Existing Entities by Enduser
    • User definable dynamic entity and UI for it (like Dynamics CRM, Sharepoint etc)
  • Reporting Sample
    • Data Only Report
    • Sql Server Reports
    • Dynamic Reporting
  • Cancellable Bulk Action with Progress Bar Sample
  • Organization Tree / Multi Level Organization Editor Sample
  • Check List Box Sample
  • Quick Filter Bar Sample
  • Advanced Filter Editing Sample
  • Excel Output Sample
  • Script / CSS Bundling
  • Grid Row Ordering Sample
  • Formatting in Lookup Editor
  • Column Formatters
  • Simple and Advanced Editor Types
  • Ajax Actions in Grid (Delete, Perform Operation etc)
  • Inline Editing In Grid
  • News Sample
  • Meeting Management Sample and Meeting Request with Outlook etc.
  • Writing Database Tests
  • Content Management System?
  • Forum?
  • Temporarily upload a file and parse it (e.g. excel)
  • Add extention table editing sample (in tab / dialog / integrated form)

Implement Mixins

The way we implement master/detail is not so intuitive.

We should provide some kind of Mixin functionality. These mixins should intercept and take role in Save/List/Retrieve handlers at various phases.

There exists a similar functionality in SaveRequestBehaviourAttribute but this needs to be attached to a SaveRequestHandler, and can't be reused in a ListRequestHandler.

Ideally, Mixins should list what kind of attributes they are interested in (the ones that activates them). This way attributes that activates mixins shouldn't have any code in them, to avoid any extra dependencies to row classes they are used with.

public class MasterDetailRelationAttribute : Attribute
{
    // zero code
}

public class OrderRow : Row
{
      [MasterDetailRelation]
      public List<OrderDetailRow> DetailList
      {
      }
}

[ActivateOn(typeof(MasterDetailRelationAttribute))]
public class DetailMixin : ISaveMixin, IListMixin, IFormMixin...
{
     void ISaveMixin.AfterSave() 
     {
          // ...
     }

     void IListMixin.OnReturn() 
     {
          // ...
     }

}

This way, DetailMixin doesn't have to be referenced from assembly where OrderRow resides, only MasterDetailRelationAttribute is enough.

Custom fields should have a required option

Currently, custom fields can't be marked as required.

We should add this option, but better not apply it in SQL side, as it would be hard to change it later.

Better, check it in Create/Update handler.

Tab Page - from CustomerOrders example

Hi Volkan,

I have a problem with a tab page like the example in serenity template - Customers -> Customer Orders. I have referred back to the example and it has the same problem :)

When you add a new Customer the Orders tab page is enabled but the CustomerOrdersGrid shows everyones orders instead of no orders. I have tried overriding the OnSaveSuccess function and apply the response.EntityID to the CustomerFilter but it doesn't fix it.

Can you help please?

Is MultipleImageUploadEditorAttribute file missing?

I want to use MultipleImageUploadEditor attribute but visual studio can not find related attribute file. There are ImageUploadEditor.cs and ImageUploadEditorAttrbute classes but there is only MultipleImageUploadEditor.cs. Is there anyway to use MultipleImageUploadEditor?

Q.Notify functions doesn't work properly, when active dialog is closed suddenly

We show notification messages on active dialog. But if we close current dialog, just after showing a notification, notification will be lost (as its parent is the dialog).

It could be better to position the notification on dialog, instead of putting it inside the dialog.

Another way would be to move the notification to next dialog or document body, when top level one is closed.

Selection boxes or List for Referenced Tables Values

Hi, back again with an issue.

I have two tables one references from the other, how can I make the sergen to generate dropdown or list in a place of foreign key id. Is this possible or you have some classes by yourself?

Example like the region selection drop down in the sample project.

IIdField Fails when key is a string

Cannot implicitly convert type 'Serenity.Data.StringField' to 'Serenity.Data.IIdField'. 
An explicit conversion exists (are you missing a cast?)

It seems that the only table(s) that are causing issues are those with key fields that are strings/varchars. Its possible that I may have configured something incorrectly. I used sergen to auto generate the code that has the issue. If I remove the table(s) that contain StringField keys then everything works.

How to add custom code or logic

Hello sir,

How to add custom code like send email or sms by click on button. Where to add some logic like test generation and calculation.

How to implement serenity style google map page?

I already write a simple pure javascript code for google maps page but i wonder is there any better solution.

I want to handle google maps canvas and and marker and others stuffs in cs file in the Script project. I don't know is TemplateDialog right class for base panel.

I put a simple class in Script project like that:

 [Panel]
    public class HaritaDialog : TemplatedDialog<object>
    {
        Widget<object> map;

        public HelalMarketHaritaDialog()
        {
         map = ById("GridDiv");   
        }

        protected override string GetTemplateName()
        {
            return "GridDialog";
        }
    }

I have create a Page and cshtml file in Web solution. In the cshtml

<div id="GridDiv"></div>

<script type="text/javascript">
    jQuery(function () {
        new Project.Module.HaritaDialog($('#GridDiv'), {}).init();

        Q.initFullHeightGridPage($('#GridDiv'));

        var myLatlng = new google.maps.LatLng(41.0191602,29.086761);

        var mapOptions = {
            center: myLatlng,
            zoom: 16,
            // disableDefaultUI: true // un-comment to remove default Maps UI
            // map type options: HYBRID, ROADMAP, SATELLITE, TERRAIN
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };

        var map = new google.maps.Map(document.getElementById("GridDiv"), mapOptions);

        Q.serviceRequest('Module/SubModule/List', {}, function(result){
    if(result!=null && result.Entities != null && result.Entities.length>0){

    for(var i=0;i<result.Entities.length;i++){
    if(result.Entities[i].Koordinat == undefined || result.Entities[i].Koordinat == null)
    break;

    var koordinat = result.Entities[i].Koordinat.split(',');
    var myLangLat = {lat: parseFloat(koordinat[0]), lng: parseFloat(koordinat[1])};

    var marker = new google.maps.Marker({
    position: myLangLat,
    map: map,
    animation: google.maps.Animation.DROP,
    title: result.Entities[i].Ad
  });

    }

    }
    }, null);
});
</script>

Add filter above grid

How to add filter like Country and City dropdown in Northwind => Customer form and bind cascading City dropdown and filter data on grid. Please guide me step by step procedure.

ListRequestHandler should support ContainsField for simple cases

Recently, we added a ContainsField option to ListRequest, but we are not using it anywhere, except some handlers that overrides ApplyContainsText method.

ListRequestHandler should make use of this parameter, along with ContainsText, when field given is not marked as FieldFlags.NotFilterable

Clientside Validation for LookupEditor

Thanks for this awesomeness and for adding the order/detail example. I have been working with Serenity for about a week and already amazed at what features are provided.

I have a question on clientside validation of the LookupEditor as used in your "New Order" form (*Customer). When a LookupEditor is a required field and not given a value before submission, clientside validation does not occur and instead server side validation throws an error in Turkish. Do you have any suggestions regarding where to best solve this issue? Thanks again sb

Multiple Lookupeditor gives an error in same Row

Hi,

I just discovered Lookupeditor attribute and love it. But I realized that a row can handle only one LookupEditor. When I used multiple Lookupeditor attribute on several field/property, t4 transforming gives an error:

Error   1   Running transformation: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Project.Entities.HedeRow' threw an exception. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: lookupType
   at Serenity.ComponentModel.LookupEditorAttribute..ctor(Type lookupType) in c:\Sandbox\Serene\Serenity\Serenity.Core\ComponentModel\PropertyGrid\Editing\BasicEditorTypes.cs:line 217
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
   at System.Reflection.RuntimePropertyInfo.GetCustomAttributes(Boolean inherit)
   at Serenity.Data.RowFieldsBase.Initialize() in c:\Sandbox\Serene\Serenity\Serenity.Data.Entity\Row\RowFieldsBase.cs:line 368
   at Serenity.Data.RowExtensions.Init[TRowFields](TRowFields rowFields) in c:\Sandbox\Serene\Serenity\Serenity.Data.Entity\Extensions\RowExtensions.cs:line 46
   at Gimnet.Sertifika.Entities.FirmaRow..cctor() in c:\Users\ademca\Documents\Visual Studio 2012\Projects\Gimnet2\Gimnet\Gimnet.Web\Modules\Sertifika\Firma\FirmaRow.cs:line 249
   --- End of inner exception stack trace ---
   at Gimnet.Sertifika.Entities.FirmaRow..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Serenity.PropertyGrid.PropertyItemHelper.GetBasedOnRow(Type type) in c:\Sandbox\Serene\Serenity\Serenity.Data.Entity\PropertyGrid\PropertyItemHelper.cs:line 63
   at Serenity.PropertyGrid.PropertyItemHelper.GetPropertyItemsFor(Type type) in c:\Sandbox\Serene\Serenity\Serenity.Data.Entity\PropertyGrid\PropertyItemHelper.cs:line 18
   at Serenity.CodeGeneration.ScriptFormGenerator.<>c__DisplayClass27_1.<GenerateCode>b__0() in c:\Sandbox\Serene\Serenity\Serenity.Web\CodeGeneration\ScriptFormGenerator.cs:line 93
   at Serenity.Reflection.CodeWriter.InBrace(Action insideBlock) in c:\Sandbox\Serene\Serenity\Serenity.Core\Reflection\CodeWriter.cs:line 47
   at Serenity.CodeGeneration.ScriptFormGenerator.GenerateCode() in c:\Sandbox\Serene\Serenity\Serenity.Web\CodeGeneration\ScriptFormGenerator.cs:line 81
   at Microsoft.VisualStudio.TextTemplatingBCDB993AC8CB286F8D6846AB78AD85B7D7613156BF763564781FB67DB2B60DA6195498D7C665D76ACF8E2657D90FF438276B8ADD17DE83AD5A98EDB2339328C3.GeneratedTextTransformation.TransformText() C:\Users\xxx\Documents\Visual Studio 2012\Projects\xxx\xxx\xxx.Script\Imports\FormContexts\FormContexts.tt  1   1   xxx.Script

How to add grid filter editor for an enum field?

Hi,

I can add filter editor into toolbar for any field in Grid screen.

protected override void CreateToolbarExtensions()
        {
            AddEqualityFilter<LookupEditor>(SomeRow.Fields.FirmaId,
               options: new LookupEditorOptions { LookupKey = "LookupKey" });
        }

But if i add enum type field i do not know what is lookup key for an enum.
I found a key in Project.Sciprt.js file, like this:

Project.Module.....SomeEnumTypeId

if i use this gives error "there is no lookup in registered list bla bla bla"

I means _enum type field_

public class XXXRow:...
{
...
public SomeEnumTypeId Field1{
get{....}
set{...}
...
}

How to add third party control

How to add third party control like tinymce editor in place of TextAreaEditor, Treeview control, radio button list, checkboxlist and many more...
How to bind default values to dropdown list. In Serenity guide show example of Adding a Movie Kind Field doesn't work. I work on Class Year drop down has some default values like

[EnumKey("CourseDB.ClassYearKind")]
public enum ClassYearKind
{
[Description("First")]
First = 1,
[Description("Second")]
Second = 2,
[Description("Third")]
Third = 3,
[Description("Fourth")]
Four = 4,
[Description("Fourth")]
Five = 5,
[Description("Sixth")]
Six = 6
}

but it didn't work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.