MB34
MB34

Reputation: 4424

ShieldUI Grid - Hide Columns by index?

Is it possible to hide columns by index? The hideColumn() function uses the field NAME:

hideColumn(columnField)

I guess I'll have to create an array of fieldnames and do it that way?

Upvotes: 0

Views: 64

Answers (1)

Vladimir Georgiev
Vladimir Georgiev

Reputation: 1949

You can take the name of the data field in a certain column, specifying its index like this:

$("#grid .sui-gridheader th.sui-headercell:eq(0)").attr("data-field")

However, you will have to take into account things such as whether it is hidden or not.

Upvotes: 0

Related Questions