gridName&index of column

1.How to get gridName?

2.How to get the index of column?

It is unclear in which situation you need to receive such info, please provide more details