tabalinas/jsgrid

Help selecting columns by name rather than Id

オープン

#998 opened on 2018/01/10

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (356 件のフォーク)batch import
help wanted

Repository metrics

Stars
 (1,520 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Hello,

I am in need to select the columns by name instead of id or to retrieve the id of the column using its name and then selecting using the retrieved id.

I am referring to the following function:

grid.fields[id_of_the_column]

I am using this function inside the filterTemplate to dynamically create dropdown options on change.

the grid code works fine if I retrieve the column by id. However there are cases where the user can add optional columns to the grid and this breaks the code (all the id are shifted if the columns are added before the targeted ones).

Thank you for your time.

コントリビューターガイド