ItemStyle question

Discussion in 'ASP .Net Datagrid Control' started by leodippolito@gmail.com, Apr 28, 2005.

  1. Guest

    Hello sirs,

    In my aspx file I have a datagrid with some BoundColumn's. When a
    format has been defined for a column (for colors, horizontal alignment,
    etc), it adds an ItemStyle element inside the bound column element, as
    in this example:

    <asp:BoundColumn DataField="DEEMAIL" SortExpression="DEEMAIL"
    HeaderText="DEEMAIL">
    <ItemStyle ForeColor="Green"></ItemStyle>
    </asp:BoundColumn>

    When a format has not been defined, the bound column element doesn't
    have this ItemStyle element (well, that's kind of obvious):

    <asp:BoundColumn DataField="NUCPF" SortExpression="NUCPF"
    HeaderText="NUCPF"></asp:BoundColumn>

    My question is: programmatically (in the .cs file), how can I check if
    an ItemStyle has been defined for a given column?

    I searched high and low but couldn't find an answer.

    I appreciate any help on this issue.

    Leonardo D'Ippolito
    , Apr 28, 2005
    #1
    1. Advertising

  2. Leonardo,

    Did you try ItemStyle property of BoundColumn class?

    Eliyahu

    <> wrote in message
    news:...
    > Hello sirs,
    >
    > In my aspx file I have a datagrid with some BoundColumn's. When a
    > format has been defined for a column (for colors, horizontal alignment,
    > etc), it adds an ItemStyle element inside the bound column element, as
    > in this example:
    >
    > <asp:BoundColumn DataField="DEEMAIL" SortExpression="DEEMAIL"
    > HeaderText="DEEMAIL">
    > <ItemStyle ForeColor="Green"></ItemStyle>
    > </asp:BoundColumn>
    >
    > When a format has not been defined, the bound column element doesn't
    > have this ItemStyle element (well, that's kind of obvious):
    >
    > <asp:BoundColumn DataField="NUCPF" SortExpression="NUCPF"
    > HeaderText="NUCPF"></asp:BoundColumn>
    >
    > My question is: programmatically (in the .cs file), how can I check if
    > an ItemStyle has been defined for a given column?
    >
    > I searched high and low but couldn't find an answer.
    >
    > I appreciate any help on this issue.
    >
    > Leonardo D'Ippolito
    >
    Eliyahu Goldin, May 1, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Clive

    ItemStyle ForeColor on a datagrid

    Clive, Jul 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,017
    Clive
    Jul 14, 2003
  2. Diego
    Replies:
    0
    Views:
    549
    Diego
    Nov 12, 2004
  3. ItemStyle question

    , Apr 28, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    327
  4. ItemStyle question

    , Apr 28, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    331
  5. Replies:
    1
    Views:
    1,626
    Scott Allen
    Apr 29, 2005
Loading...

Share This Page