Grid ColCnt

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Post Reply
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Grid ColCnt

Post by John »

I see on the wiki that there is a RowCnt parameter to enable you to query a grid or list to get the number of rows on it... Is there a way to get a "ColCnt" or query a grid to get it's column count?

-john
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

The purpose of RowCnt is to work in conjunction with another parameter such as CHG or SEL to find the needed dimension for an export array. It is not designed to simply return the number of rows in a list/grid.

Assuming that you populated your list in chunks and did not have an array that you could UDIM for rows then to find the number of rows in a list/grid you would need to select all of them so that the SEL parameter was invoked.

To find the number of columns in a list grid simply UDIM your header array.

FNGeorge
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Post by John »

I'm working with a variable number of grids in a seperate library function from the one that populated them. What I did was to share a local matrix and store the number of items in the heading arrays as i made each of the grids. This works pretty well, but honestly I think it'd be better if I could query the grid.

Thanks fnGeorge,
John
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Post by John »

This looks great Mikhail. I'll try it out - thank you. This is actually the second piece of helpful grid advice you've given me on this same project :D Thanks again.

-John
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Post by John »

Oh I need this for a "List", not a "grid" - unfortunately this only works for grids. gives me an 0876. would still be a great soulution for grids :P
Post Reply