Author Topic: Need a demo for Version 8.4.0 regarding datepicker and Dropdown list issue  (Read 427 times)

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
Hi Team,

Your updation like,
=========================================
Editor (v8.4.0)
In previous versions, custom editors could be created in column.type callback.

In current version (v8.4.0), column.type callback is reserved for specifying the type of editor only. Specifically ui.$cell is undefined inside the editor.type callback.

Rather column.init callback can be used for creating custom editors.
=================================================

Our code like below,

editor: {
                            type: function (ui) {
                                var ControlTypeId = ui.rowData["ControlTypeID"];
                                var IsAbstract = ui.rowData["IsAbstract"];
                                var ElementType = ui.rowData["ElementType"];
                                var ElementID = ui.rowData["id"];

                                if (ControlTypeId == "2" && ElementType == "xbrli:booleanItemType") {
                                    var str = "";
                                    str = "<select class='pq-editor-focus  pq-cell-editor' name='Name' style='min-width: 245px; max-width: 722px; max-height: 319px; width: 245px;'>";
                                    str += "<option value='Yes'>Yes</option>";
                                    str += "<option value='No'>No</option>";
                                    str += "</select>";
                                    ui.$cell.append(str);  // Issue with this line=============================================
                                }
                                if (ElementType == "xbrli:dateItemType") {
                                var $cell = ui.$cell,
                                        rowData = ui.rowData,
                                        dataIndx = ui.dataIndx,
                                        cls = ui.cls,

                                        dc = $.trim(rowData[dataIndx]);
                                        ui.$cell.css('padding', '0'); // Issue with this line=============================================
                                }
}
++++++++++++++++++++++++++++++++

We are not able to understand what should we have to put instead of "ui.$cell.append(str); " code for dropdown and "ui.$cell.css('padding', '0');" for Datepicker

Kindly give us a demo so we can implement ASAP

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
I understand from your code that you are using different editors in same column.

It's incorrect to use ui.$cell inside column.editor.type callback.

Its equivalent in v8.4.0 is ui.$cell.css({ padding: '0' }).html(str); inside column.editor.init callback. However there is no need to build select lists by string manipulation since select lists are inbuilt in v8.4.0 and you only need to define column.editor.options.

Please check similar example for v8.4.0: https://paramquery.com/pro/demos/editors_conditional
« Last Edit: June 09, 2022, 12:55:13 pm by paramvir »

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 44
    • View Profile
Thanks for your revert with demo.

One more things we need from your side.

Could you give us a demo where columns generated dynamically with different-different datatype of cell with respect to the columns?

We have multiple scenario to generate the columns in gird.

I have attached some scenario as a sample here.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
There is no support for different datatypes for different cells in same column currently

though

different editors can be used in same column e.g., https://paramquery.com/pro/demos/editors_conditional