Page 1 of 1

Lines? in a DataGrid

Posted: Sun Jun 08, 2014 11:36 pm
by lohill
Does anyone know the maximum number of lines a dataGrid can contain? Even a good feel for what that number might be would be helpful. I can tell you from experience that it will not allow 916,898. (That is the number of combinations of 70 things taken four at a time.)

Larry

Re: Lines? in a DataGrid

Posted: Mon Jun 09, 2014 2:45 am
by dunbarx
Hi,

Not sure how far one might push this, but I put this in a button on a card with one DG:

Code: Select all

on mouseUp
   put "A" & tab & "B" into temp
   repeat 100
      put temp & return after accum
   end repeat
   
   repeat 100
      put accum & return after accum1
   end repeat
   
   repeat 100
      put accum1 & return after accum2
   end repeat
   
   set the dgtext of grp 1 to accum2
   answer the number of lines of the dgtext of grp 1
end mouseUp
Worked fine. A bit over a million. But more that your 900-odd K.

Craig Newman

Re: Lines? in a DataGrid

Posted: Mon Jun 09, 2014 5:15 pm
by lohill
Interesting Craig,

I expanded to the following and still did not have a problem

Code: Select all

on mouseUp
   put "Aaaaaaaaaaaaaaaaaaaaa" & tab & "Bbbbbbbbbbbbbbbbbbbbb" & tab & "Cccccccccccccccccccc" & tab & "Dddddddddddddddd" into temp
   repeat 100
      put temp & return after accum
   end repeat
   
   repeat 100
      put accum & return after accum1
   end repeat
   
   repeat 100
      put accum1 & return after accum2
   end repeat
   
   set the dgtext of grp "DataGrid 1" to accum2
   answer the number of lines of the dgtext of grp "DataGrid 1"
end mouseUp
Larry

Re: Lines? in a DataGrid

Posted: Mon Jun 09, 2014 6:22 pm
by dunbarx
Larry.

So we have more text in the DG, but the same number of lines. I guess this is a good thing, as far as it goes.

But what did you mean when you said ..."and still did not have a problem"? Does that mean that your earlier 900K line DG still does?

If you: "answer the length of accum2", and compare it with the length of your original problem DG, is there anything to learn there? What were the elements of your combinatorial thingie?

Craig