Customize initCreate?

Customize initCreate?

ttsullivanttsullivan Posts: 10Questions: 5Answers: 1

I'm using Editor in my app. In the app, users define a set of stock buy & sell rules using six dependent select2 select boxes. Presently, I'm using initCreate to add a new rule (row) to the table. However, it is paramount that when adding a new row that it be part of a group of rules as shown on the attached screen shot. Is there a way to customize initCreate such that a new row is always added to the row just above the row containing the new row button (+)? Do you have access to an example?

Answers

  • kthorngrenkthorngren Posts: 20,268Questions: 26Answers: 4,765

    The row order is based on the sorting options set for the table. When inserting a new row it will be displayed based on the table order. Some options are:

    • Create a sorting plugin some examples are here.
    • Create an index column or columns that can be used to order the table. The columns can be hidden. Here is an example of dynamically creating the index column.

    What you asking for is not impossible but it would take a fair amount of work. I'm not familiar with any examples. You might find something similar on the forum.

    Kevin

This discussion has been closed.