Datagrid column captions


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Datagrid column captions

  1. #1
    Damian Guest

    Datagrid column captions


    Dear friends,

    I'm having a problem on trying to modify the captions of a Datagrid Columns.
    Although setting the "Caption" property of every column of the datatable
    the datagrid is bound to, when displaying the datagrid, the content of the
    ColumnName property is displayed instead. This is supposed to be displayed
    only if the Caption property is not explicitly set.

    Has anybody ever come across this problem. Thank you very much in advance
    for any feedback.

    Best regards,
    Damianos



  2. #2
    Srinivas Kotipalli Guest

    Re: Datagrid column captions

    Try this
    ******************************************************
    Dim myGridColumns as GridColumnStylesCollection
    myGridColumns = DataGrid1.TableStyles(0).GridColumnStyles

    'format the columns

    myGridColumns(0).HeaderText = "Column One"

    myGridColumns(1).HeaderText = "Column Two"

    myGridColumns(2).HeaderText = "Column Three"

    myGridColumns(3).HeaderText = "Column Four"

    **********************************************************



    "Damian" <gavalas_damianos@yahoo.com> wrote in message
    news:3cd97a43$1@10.1.10.29...
    >
    > Dear friends,
    >
    > I'm having a problem on trying to modify the captions of a Datagrid

    Columns.
    > Although setting the "Caption" property of every column of the datatable
    > the datagrid is bound to, when displaying the datagrid, the content of the
    > ColumnName property is displayed instead. This is supposed to be displayed
    > only if the Caption property is not explicitly set.
    >
    > Has anybody ever come across this problem. Thank you very much in advance
    > for any feedback.
    >
    > Best regards,
    > Damianos
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center