jQWidgets Forums

jQuery UI Widgets Forums ASP .NET MVC How to create editor for jqx-grid colum using tag helper

This topic contains 1 reply, has 1 voice, and was last updated by  Admir Hodžić 8 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Admir Hodžić
    Participant

    I am trying to build jqx-grid using MVC TAg helpers.
    On that grid I try to make custom columns editor.
    When I write razor I get IntelliSense for create-editor on column
    <jqx-grid-column editable="true" datafield="fc" text="fc" cells-format="c2" cells-align="HorizontalAlignment.Right" create-editor="createFCedior()"></jqx-grid-column>

    On my view inside js I have function

     var createFCedior = function (row, cellvalue, editor) {
                console.log("eve te u editoru");
                //editor.jqxNumberInput({ decimalDigits: 0, digits: 3 });
            };

    When I start editing cell I get error in console
    Uncaught TypeError: c.createeditor is not a function
    Google developer tools show me this part of code that is falling
    https://goo.gl/photos/x5bjgrJgfMNAepYD9

    How we can create custom edditors with .NET core tag helpers
    Thanx in advanced


    Admir Hodžić
    Participant

    I am sory for spaming form, but I fund solution.
    For future readers that is workaround:

    When writing razor using .NET core tag helpers properties that accepts string as function names shod not have quotes

    <jqx-grid-column editable="true" datafield="rb1" init-editor=initNumEditor() text="Rabat1" cells-format="p2" width="80" cell-end-edit=setMartMpcNaGriduCijena() cells-align="HorizontalAlignment.Right" align="center"  column-type="numberinput" cell-begin-edit="function(row, datafield, columntype, value){
                                                    if (row==0){
                                                     return false;
                                                    };
                                    }" ></jqx-grid-column>

    Take look for properies init-editor or cell-end-edit they are call function names whiteout quotes ” even it accepts sting.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.