When the editor opens, select another cell

Tags: #<Tag:0x00007f8b2b0b2148>

You’re great. The problem is the input method.
I am a Chinese developer.

We like you very much HST, thank you.

So you have already solve it, @MaLaTang?

ps. what’s HST? I do not know this one :slight_smile:

HST= hands on table ???
Turned out to be hot?
hahaha,…

@aleksandra_budnik

Hi, I have a new question
I would create a blank table, without setting columns:[{}…] .
In the following, I obtained a list through ajax. The list fields are name, sex and age.
At this point, I need to bind age to the cell in row 3 and column 4 and have it render all the data down normally.
Should I use updateSetting?

Hehe, yes we’re used to call it HOT :slight_smile:

You can create a table as an array of arrays (minCols, minRows + setDataAtCell for the value in 3, 4), and then use loadData method for new data + updateSettings > columns to define the object data.

@aleksandra_budnik
It seems to work.:grinning:
But,
I can’t preset columns:[{}{}{]], because I’m creating a blank table.
All my actions are set by the user, and I provide an interface like design interface and editor.
I set the cell type with setCellMeta, such as setCellMeta(1,1,“type”,“date”);

1、At this point, how do I define the format of date?
2、I read the database data through Ajax, and the data returned to me are [{name: Mr,age:18},{name:han,age:18},{name:jack,age:31},{name:zhao,age:20},{name: Mr,age:28}]. How can I update columns:[{},{},{}] via setCellMeta?

If you want to set formatting or type for a single cell you can use cells method. Here is an example https://jsfiddle.net/handsoncode/8a35Lwkm/

How can I update columns:[{},{},{}] via setCellMeta?

you should use updateSettings to update columns. You just pass a new structure. In your case, it would be https://jsfiddle.net/handsoncode/yLrc5wvm/

@aleksandra_budnik
Thank you for the presentation, but it didn’t go my way.:confused:

  1. My table has been pre-created, so I can’t change some options.

  2. I want dynamic, js, to change cellType, I am currently using hot.setcellmeta (0, 0, “type”, “date”); , so the cell is converted to the date type, but type=select is invalid, why? Is there any further usage or documentation for this?

  3. I know that I can use updateSetting to update columns, and the setting of each column must be written, but this will make my table become a fixed column, which is not desirable, because I need to provide users with new deletions at any time.

It’s nine o 'clock in the morning.
By the way, what are your working hours and time zones? :slight_smile:

We’re from Poland, working in CET @MaLaTang

select cell type is defined by editor: 'select',
You can use editor, validator and renderer instead of type in the setCellMeta.

@aleksandra_budnik
Yes,

Is there no way to set an array of objects to any row or column for rendering?

This is important to me!:confounded:

Thanks again.

Can you share the dataset and expected result? I’ve read the whole topic once again and I do not see were is the issue.

@aleksandra_budnik
I use a GIF to show what I mean.

To parse out the key in the array object, I drag it through the JS implementation to the cell and set it to the cellMeta.

Then, I need to loop through all the values while rendering. Do you understand?

I can’t pre-set columns:[{},{}], because I need to manually enter some other values or calculations somewhere.

Can be set to render in any line or column.

Wait online

You do not need to define columns. That is not necessary. You can set a table with empty rows and columns via minRows and minCols like in the table above and change the cell type whenever you want (via cells method and updateSettings).

@aleksandra_budnik
Do not define columns? Cannot load array object type data! Cells how to implement the corresponding column loading the data in the array object? Could you please demonstrate it? Thank you.

I’m just going to add one more thought

Please confirm.
In the next GIF you are setting each field of the table to different cell type. Do you want do the same in Handsontable?

@aleksandra_budnik
No, it’s supposed to render the contents of this array object, and the GIF is the key that I pulled out.

I want him to be like columns:[{},{},{}…] Rendering assignment.

Can you tell me a specification for each cell for

  • validator
  • editor (date/text)
  • renderer

I think that this will help us to create a POC for you.

@aleksandra_budnik
Sorry, I think text is ok.

I think it’s important how the data is rendered.

@aleksandra_budnik
Like this GIF,
Somehow bound the data in the array object to any row or column,
Then render.
Rather than using columns:[{},{},{}], to bind the whole column directly, because I might be typing something else.