Datagid Col BackGround

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fabrizio

    #1

    Datagid Col BackGround

    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

  • pcPirate

    #2
    Re: Datagid Col BackGround


    "Fabrizio" <fmaltese@gesti onescorte.it> wrote in message
    news:09e401c3a5 35$9181d2c0$a50 1280a@phx.gbl.. .[color=blue]
    > 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
    >[/color]


    Comment

    • pcPirate

      #3
      Re: Datagid Col BackGround

      Hi,
      Perhaps you can try this:
      http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q927q

      pcPirate.

      "Fabrizio" <fmaltese@gesti onescorte.it> wrote in message
      news:09e401c3a5 35$9181d2c0$a50 1280a@phx.gbl.. .[color=blue]
      > 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
      >[/color]


      Comment

      • Jeffrey Tan[MSFT]

        #4
        RE: Datagid Col BackGround


        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" <fmaltese@gesti onescorte.it>
        | Sender: "Fabrizio" <fmaltese@gesti onescorte.it>
        | Subject: Datagid Col BackGround
        | Date: Fri, 7 Nov 2003 05:46:38 -0800
        | Lines: 7
        | Message-ID: <09e401c3a535$9 181d2c0$a501280 a@phx.gbl>
        | 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: AcOlNZGB45JIFKN DQzaVUv1dBvd03w ==
        | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
        | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
        | Path: cpmsftngxa06.ph x.gbl
        | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1974 23
        | NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
        | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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
        |
        |

        Comment

        Working...