How Can I count the number of columns in the Grid.

Hi All,

Can anyone say is there any option for counting the number of columns in the form grid using X++?

Kindly advise on this.

controlCount() method of the grid control should give you the number.

Thanks, Martin. Is there any link to follow?

A link for what? What would you expect to find at the page where the link would navigate you?

Maybe you don’t know how call methods or how to get a reference to the grid control. We can’t give you a page explaining your problem if you don’t tell us what the problem is. And when you do, we might be able to tell you here, instead of searching internet and trying to find a page dealing with exactly the same question.

Also note that if you want to see how a method is used in standard code, you can use cross-references. But this is just a single method returning a number, so there isn’t much to see.

Thanks Martin,

I will try and let you know on this.