Datagid Col BackGround

  • Thread starter Thread starter Fabrizio
  • Start date Start date
F

Fabrizio

Hi,
Is it possible to give a different background color to a
single column in a Datagrid? And arrange the text
position in the single cell ( middle center)?
Thank you in advance,
Fabrizio
 
Fabrizio said:
Hi,
Is it possible to give a different background color to a
single column in a Datagrid? And arrange the text
position in the single cell ( middle center)?
Thank you in advance,
Fabrizio
 
Hi Fabrizio,

Is your application WinForm or web form?
If it is WinForm, you can just follow pcPirate's sample, inherit
columnstyle and override the Paint method.
If it is Web form, you can add the column yourself, and in the DataGrid
property dialog, refer to the format tab page, then you can customize each
column's items formating.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Fabrizio" <[email protected]>
| Sender: "Fabrizio" <[email protected]>
| Subject: Datagid Col BackGround
| Date: Fri, 7 Nov 2003 05:46:38 -0800
| Lines: 7
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcOlNZGB45JIFKNDQzaVUv1dBvd03w==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:197423
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
| Is it possible to give a different background color to a
| single column in a Datagrid? And arrange the text
| position in the single cell ( middle center)?
| Thank you in advance,
| Fabrizio
|
|
 
Back
Top