Re: just can't figure this out

From: Mark Fitzpatrick (markfitz_at_fitzme.com)
Date: 09/17/04


Date: Fri, 17 Sep 2004 12:59:22 -0500

It looks like you are using an HTML table control and not a table web
control. There is no backcolor for an HtmlTable control. Backcolor would be
used if this was a Table Web Control. Instead, use bgcolor and try casting
as an HtmlTable instead.

        Hope this helps,
        Mark Fitzpatrick
        Microsoft MVP - FrontPage

"Mike" <Mike@discussions.microsoft.com> wrote in message
news:2F79E047-B8AA-417D-BEB8-700429E9C387@microsoft.com...
> I've been banging my head on this for days and can't get it working. If i
> can't get it by today then i'm done with it.
> I have a datalist that has a table in it
>
> <asp:datalist id=dl1>
> <itemtemplate><table id=vechicle>
> <tr>
> <td>dataitem</td>
> </tr>
> </table>
> </itemtemplate>
> </aspdatalist>
> and this displays in the datalist nicely formatted etc. and the data is in
> seperate tables within the DL. NOW the part i can't get working. I need to
> change the background color of the table(s) based on the dataitem.
> I can do this on a label with ctype(e.item.findcontrol(""), label) in the
> DL
> itemdatabound routine
>
> but when i try this with a table i get an error, can't find object or
> reference and breaks at the table code:
> dim table as table = CType(e.item.findcontrol("tablename"), table)
> table.backcolor = color.yellow
>
> and it breaks, any suggestions on how i can do this?
>
>



Relevant Pages

  • Re: Problems with codedom serialization
    ... In other words we want our BackColor property to return the ... You should visually see the result in your control. ... private Color faceColor = SystemColors.Control; ... >>> not serialize this property. ...
    (microsoft.public.dotnet.framework.windowsforms.designtime)
  • Re: User Controls (Active X) - Da Process
    ... When you hit the Finish button, the wizard will fill the code module ... you still have to write the code that gives your control its functionality.... ... lets say all you wanted to expose was a BackColor ... Let's say you want to give your control a Draw ...
    (microsoft.public.vb.general.discussion)
  • Re: Criteria on a form
    ... *backcolor property* of each control, using one SetValue action for each ... set a condition on the macro. ... sets the backcolor to gray ... replace TextboxControlName with the correct name of a textbox control, ...
    (microsoft.public.access.forms)
  • Re: Changing subform backcolor from main form
    ... on a subform which resides on a Tab Control. ... The 1st subform is named frm_Parts with its main ... A form does not have a Backcolor property. ...
    (microsoft.public.access.forms)
  • RE: Make Backstyle transparent on continuous form
    ... Public Function ToggleControl(ctl As Control) As Boolean ... after you type the ctl. ... If TypeOf ctl Is Textbox Then ... cell is selected on any record, the BackColor turns white. ...
    (microsoft.public.access.formscoding)