Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fix the grid column 1

Status
Not open for further replies.

Siddiq

MIS
Sep 23, 2000
46
0
0
PK
how to fix the all columns in a grid by a single command...?
that user should not change the column size...
 
HI
IN the init event of the grid, insert the code..

THIS.SetAll("WIDTH",myWidth)

In the place of myWidth, suitably put the width value required by you.

Hope this helps you :)
ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Thanks Ramani for your help..

But my question is that, How to fix the all colum with a single command ? that no one can change the size of any colum ...

like it is option of the rowfixing by ( allowrowsizing ) but I could not find any command for colum sizing to do not allow the user to change..
 
If you use your own class to build the grid, you could save off the width of each column as you want it, and then, wihle you can't stop them from changing the size, you can use the columns Resize() method to set it back to the saved size!

Rick
 
Actually, what you're looking for does exist. :eek:)

Put this in the grid's INIT event:
[tt]
this.SetAll("resizable",.F.,"column")
[/tt]
Ian
 
Thanks Chpicker.. it is working perfectly...
 
Ian,
Sure, do it the easy way! Sometimes it's &quot;tough to see the forest for all trees&quot;! <g> Another time that I had to check my code to see that that's exactly what I had done a couple years back, but the technique was &quot;lost&quot; to my current thought processes.

Rick
 
Heh...don't feel bad, Rick, I had to go back and look up how I had done it to post that answer! LOL

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top