How to define memo-style editor for grid cells

4 posts, 0 answers
  1. Ron
    Ron avatar
    45 posts
    Member since:
    Sep 2011

    Posted 11 Dec 2011 Link to this post

    I have a grid that is bound to a data-source with a schema - if I defined the grid editable, and the data-source has a schena that defines what fields are editable, and how to edit them.

    If I define the type of a field as string - I get an editor that is one line only. Is there a way to define an editor that allows multiple lines (either dynamically when recognizing an enter key, or with a pre-defined line count)?

    My current schema looks like:

     schema: {
              model: {
                 id: "ID",
                 fields: {
                      ID :{editable: false, nullable: false},
                      Time: { editable: false, nullable: true },
                      Monday: { type: "string" },
                      Tuesday: { type: "string" },
                      Wednesday: { type: "string" },
                      Thursday: { type: "string" },
                      Friday: { type: "string" },
                      Saturday: { type: "string" },
                      Sunday: { type: "string" }
                 }
              } // model

  2. Rosen
    Admin
    Rosen avatar
    2630 posts
    Member since:
    Sep 2012

    Posted 13 Dec 2011 Link to this post

    Hi Ron,

    I'm afraid  that in the current version of KendoUI changing the editors are not supported. However, have already addressed this limitation and with the next version of the grid widget, specifying custom editors will be possible. I have attached a small sample using an internal build of KendoUI which demonstrates basic usage of such custom editor.

    Regards,
    Rosen
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!

  3. João
    João avatar
    8 posts
    Member since:
    Jan 2012

    Posted 06 Jan 2012 Link to this post

    I am hardly trying to apply a custom editor to a grid column, with no success at all.

    I have found this custom-editor.zip attachment from Rosen, and it does not work with current Kendo UI version (v2011.3.1129).

    I have also found a code snippet in another forum thread which apparently uses a custom editor.

    It seems my code is alright. My conclusion is that the feature is currently not working. Is this correct? If not, I'd like to see a small working sample / demo, where a custom editor is applied to a grid column. Or some workaround for the issue...

    Thank you!

    EDIT: Sorry, the attachment works if we use the kendo.all.min.js included there, which is ahead of the current release. It seems we need to wait for next release to use the feature... Is there a patch available for use before next release?

  4. João
    João avatar
    8 posts
    Member since:
    Jan 2012

    Posted 06 Jan 2012 Link to this post

    For those who "desperately" need a custom editor now and can't wait for next release, just like me... :-)

    ...here is my workaround... change line #12320 of kendo.all.js to this:

    fields: { field: column.field, format: column.format, editor: column.editor },

    ...and voilà! Now the "editor" setting for the column makes effect!

Back to Top