Re: creating styles for certain cells in a table

Discussion in 'ASP .Net' started by Lenny, Jul 29, 2003.

  1. Lenny

    Lenny Guest

    <link rel="stylesheet" type="text/css" href="myfile.css" />
    Then use:
    ..cssClass property.

    "Jeremy Chapman" <> wrote in message
    news:...
    > I am dynamically creating rows and cells in code in a Table component. I
    > want to be able to define external style sheets and apply different ones

    to
    > different cells depending on how I want each one to look like.
    >
    > How do I do this?
    >
    >
     
    Lenny, Jul 29, 2003
    #1
    1. Advertising

  2. Lenny

    Seaside Guest

    Let us see what you've done. Perhaps that will help.



    "Jeremy Chapman" <> wrote in message
    news:...
    > hm... I've done that, but my css file must be formatted incorrectly. is
    > there a template available or some example of the css class?
    >
    > "Lenny" <> wrote in message
    > news:...
    > > <link rel="stylesheet" type="text/css" href="myfile.css" />
    > > Then use:
    > > .cssClass property.
    > >
    > > "Jeremy Chapman" <> wrote in message
    > > news:...
    > > > I am dynamically creating rows and cells in code in a Table component.

    > I
    > > > want to be able to define external style sheets and apply different

    ones
    > > to
    > > > different cells depending on how I want each one to look like.
    > > >
    > > > How do I do this?
    > > >
    > > >

    > >
    > >

    >
    >
     
    Seaside, Jul 29, 2003
    #2
    1. Advertising

  3. in my .aspx page I've put the following line in the HEAD section
    <LINK REL="stylesheet" TYPE="text/css" HREF="GlobalStyles.css">

    and this is my GlobalStyles.css file

    styScheduleHeaderColumn
    {
    height: 10;
    background-color: #E6C186;
    font-family: Arial;
    font-size: xx-small;
    }

    styCell
    {
    height: 65;
    background-color: #E6C186;
    font-family: Arial;
    font-size: xx-small;
    }

    styCellLine
    {
    height: 15;
    background-color: #E6C186;
    font-family: Arial;
    font-size: xx-small;
    }

    "Seaside" <> wrote in message
    news:%...
    > Let us see what you've done. Perhaps that will help.
    >
    >
    >
    > "Jeremy Chapman" <> wrote in message
    > news:...
    > > hm... I've done that, but my css file must be formatted incorrectly.

    is
    > > there a template available or some example of the css class?
    > >
    > > "Lenny" <> wrote in message
    > > news:...
    > > > <link rel="stylesheet" type="text/css" href="myfile.css" />
    > > > Then use:
    > > > .cssClass property.
    > > >
    > > > "Jeremy Chapman" <> wrote in message
    > > > news:...
    > > > > I am dynamically creating rows and cells in code in a Table

    component.
    > > I
    > > > > want to be able to define external style sheets and apply different

    > ones
    > > > to
    > > > > different cells depending on how I want each one to look like.
    > > > >
    > > > > How do I do this?
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Jeremy Chapman, Jul 29, 2003
    #3
  4. Lenny

    Seaside Guest

    Great but how do you distinguish one cell from another in your ASPX page? It
    seems that might be the missing part of the puzzle.





    "Jeremy Chapman" <> wrote in message
    news:...
    > in my .aspx page I've put the following line in the HEAD section
    > <LINK REL="stylesheet" TYPE="text/css" HREF="GlobalStyles.css">
    >
    > and this is my GlobalStyles.css file
    >
    > styScheduleHeaderColumn
    > {
    > height: 10;
    > background-color: #E6C186;
    > font-family: Arial;
    > font-size: xx-small;
    > }
    >
    > styCell
    > {
    > height: 65;
    > background-color: #E6C186;
    > font-family: Arial;
    > font-size: xx-small;
    > }
    >
    > styCellLine
    > {
    > height: 15;
    > background-color: #E6C186;
    > font-family: Arial;
    > font-size: xx-small;
    > }
    >
    > "Seaside" <> wrote in message
    > news:%...
    > > Let us see what you've done. Perhaps that will help.
    > >
    > >
    > >
    > > "Jeremy Chapman" <> wrote in message
    > > news:...
    > > > hm... I've done that, but my css file must be formatted incorrectly.

    > is
    > > > there a template available or some example of the css class?
    > > >
    > > > "Lenny" <> wrote in message
    > > > news:...
    > > > > <link rel="stylesheet" type="text/css" href="myfile.css" />
    > > > > Then use:
    > > > > .cssClass property.
    > > > >
    > > > > "Jeremy Chapman" <> wrote in message
    > > > > news:...
    > > > > > I am dynamically creating rows and cells in code in a Table

    > component.
    > > > I
    > > > > > want to be able to define external style sheets and apply

    different
    > > ones
    > > > > to
    > > > > > different cells depending on how I want each one to look like.
    > > > > >
    > > > > > How do I do this?
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Seaside, Jul 29, 2003
    #4
  5. I've built a custom ItemTemplate class which ownes a Table component. The
    binding event of the ItemTemplate determines the style for the cell.

    "Seaside" <> wrote in message
    news:...
    > Great but how do you distinguish one cell from another in your ASPX page?

    It
    > seems that might be the missing part of the puzzle.
    >
    >
    >
    >
    >
    > "Jeremy Chapman" <> wrote in message
    > news:...
    > > in my .aspx page I've put the following line in the HEAD section
    > > <LINK REL="stylesheet" TYPE="text/css" HREF="GlobalStyles.css">
    > >
    > > and this is my GlobalStyles.css file
    > >
    > > styScheduleHeaderColumn
    > > {
    > > height: 10;
    > > background-color: #E6C186;
    > > font-family: Arial;
    > > font-size: xx-small;
    > > }
    > >
    > > styCell
    > > {
    > > height: 65;
    > > background-color: #E6C186;
    > > font-family: Arial;
    > > font-size: xx-small;
    > > }
    > >
    > > styCellLine
    > > {
    > > height: 15;
    > > background-color: #E6C186;
    > > font-family: Arial;
    > > font-size: xx-small;
    > > }
    > >
    > > "Seaside" <> wrote in message
    > > news:%...
    > > > Let us see what you've done. Perhaps that will help.
    > > >
    > > >
    > > >
    > > > "Jeremy Chapman" <> wrote in message
    > > > news:...
    > > > > hm... I've done that, but my css file must be formatted

    incorrectly.
    > > is
    > > > > there a template available or some example of the css class?
    > > > >
    > > > > "Lenny" <> wrote in message
    > > > > news:...
    > > > > > <link rel="stylesheet" type="text/css" href="myfile.css" />
    > > > > > Then use:
    > > > > > .cssClass property.
    > > > > >
    > > > > > "Jeremy Chapman" <> wrote in message
    > > > > > news:...
    > > > > > > I am dynamically creating rows and cells in code in a Table

    > > component.
    > > > > I
    > > > > > > want to be able to define external style sheets and apply

    > different
    > > > ones
    > > > > > to
    > > > > > > different cells depending on how I want each one to look like.
    > > > > > >
    > > > > > > How do I do this?
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Jeremy Chapman, Jul 29, 2003
    #5
  6. Lenny

    Seaside Guest

    Well that's the point. You have to apply the style to the individual cell as
    needed. You've created the styles but don't seem to have applied them to the
    cells. How are you trying to do this?



    "Jeremy Chapman" <> wrote in message
    news:%...
    > I've built a custom ItemTemplate class which ownes a Table component. The
    > binding event of the ItemTemplate determines the style for the cell.
    >
    > "Seaside" <> wrote in message
    > news:...
    > > Great but how do you distinguish one cell from another in your ASPX

    page?
    > It
    > > seems that might be the missing part of the puzzle.
    > >
    > >
    > >
    > >
    > >
    > > "Jeremy Chapman" <> wrote in message
    > > news:...
    > > > in my .aspx page I've put the following line in the HEAD section
    > > > <LINK REL="stylesheet" TYPE="text/css" HREF="GlobalStyles.css">
    > > >
    > > > and this is my GlobalStyles.css file
    > > >
    > > > styScheduleHeaderColumn
    > > > {
    > > > height: 10;
    > > > background-color: #E6C186;
    > > > font-family: Arial;
    > > > font-size: xx-small;
    > > > }
    > > >
    > > > styCell
    > > > {
    > > > height: 65;
    > > > background-color: #E6C186;
    > > > font-family: Arial;
    > > > font-size: xx-small;
    > > > }
    > > >
    > > > styCellLine
    > > > {
    > > > height: 15;
    > > > background-color: #E6C186;
    > > > font-family: Arial;
    > > > font-size: xx-small;
    > > > }
    > > >
    > > > "Seaside" <> wrote in message
    > > > news:%...
    > > > > Let us see what you've done. Perhaps that will help.
    > > > >
    > > > >
    > > > >
    > > > > "Jeremy Chapman" <> wrote in message
    > > > > news:...
    > > > > > hm... I've done that, but my css file must be formatted

    > incorrectly.
    > > > is
    > > > > > there a template available or some example of the css class?
    > > > > >
    > > > > > "Lenny" <> wrote in message
    > > > > > news:...
    > > > > > > <link rel="stylesheet" type="text/css" href="myfile.css" />
    > > > > > > Then use:
    > > > > > > .cssClass property.
    > > > > > >
    > > > > > > "Jeremy Chapman" <> wrote in message
    > > > > > > news:...
    > > > > > > > I am dynamically creating rows and cells in code in a Table
    > > > component.
    > > > > > I
    > > > > > > > want to be able to define external style sheets and apply

    > > different
    > > > > ones
    > > > > > > to
    > > > > > > > different cells depending on how I want each one to look like.
    > > > > > > >
    > > > > > > > How do I do this?
    > > > > > > >
    > > > > > > >
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Seaside, Jul 29, 2003
    #6
    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. Replies:
    0
    Views:
    561
  2. =?Utf-8?B?Z2xlbm4=?=

    Cannot get text in certain cells of DataGrid to wrap

    =?Utf-8?B?Z2xlbm4=?=, Jun 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    421
    =?Utf-8?B?Z2xlbm4=?=
    Jun 15, 2006
  3. Jeremy Chapman

    Controls in certain cells in a grid

    Jeremy Chapman, Aug 15, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    135
    Alvin Bruney
    Aug 16, 2003
  4. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    343
    Joel Finkel
    Sep 1, 2003
  5. Erik Cruz

    Styles for cells

    Erik Cruz, Sep 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    129
    Erik Cruz
    Sep 6, 2003
Loading...

Share This Page