Article View: borland.public.delphi.winforms.controls.using
Article #142Re: Changing Datagrid Column Width
From: Mark
Date: Wed, 21 Jun 2006 02:52
Date: Wed, 21 Jun 2006 02:52
28 lines
2201 bytes
2201 bytes
I moved the code to the Load event, it still doesn't work, but I have an idea as to why that might be. I used the ellipsis on "TableStyles" to add a single table style, then I added columns in the "GridColumnStyles". However, I don;t see how any of these styles are related back to my grid. Is their a property somewhere that tells the grid which tableStyle to use? What about the grid columns? How do I relate those to columns in my grid? "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> wrote in message news:4498008d$1@newsgroups.borland.com... > Mark wrote: >> I added a tble style in the Object Inspector and ran the code under a >> button, but the column width doesn't change. Is there something else >> that I have to do? >>> >>> Datagrid1.TableStyles[0].GridColumnStyles[0].Width := 100; > > Shouldn't be - this has worked fine for me. The only difference is I'm > doing it in the Form Load event. Don't see why it wouldn;t work elsewhere > though. > > -- > Wayne Niddery - Winwright, Inc (www.winwright.ca) > "It used to be that other people's achievements were considered an > inspiration, not a grievance." >
Technical Details
Message-ID:
<4498b484$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<448e601c@newsgroups.borland.com> <448f0fe6@newsgroups.borland.com> <4496e58b$1@newsgroups.borland.com> <4498008d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,e3d74b8ff004d8d3 X-Google-Attributes: gid1eff29,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Mark" <marka34@hotmail.com> Newsgroups: borland.public.delphi.winforms.controls.using References: <448e601c@newsgroups.borland.com> <448f0fe6@newsgroups.borland.com> <4496e58b$1@newsgroups.borland.com> <4498008d$1@newsgroups.borland.com> Subject: Re: Changing Datagrid Column Width Date: Tue, 20 Jun 2006 22:52:56 -0400 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 69.208.54.146 Message-ID: <4498b484$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1150858372 69.208.54.146 (20 Jun 2006 19:52:52 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail