Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb_dotnet thread: Datagrid ItemStyle and AlternateItemStyles


Message #1 by "SiberWulf" <siberteknix@s...> on Thu, 12 Dec 2002 21:50:36
Hello all, quick question.

I'm writing an application that is basically like a message board system, 
but allows user configuration through a webform.


I run into a problem when I do a preview (manually set properties) of an 
Itemline, it automatically applies that same property to the alternate 
items (see code).  Is there any way for me to NOT have the Item styles 
applied to the Alternate Items? This is happening in my datagrids.  This 
only happens with text decoration, not with colors and text colors.


Heres's some source:

 If cbItemOverline.Checked = True Then
            dgPreview.ItemStyle.Font.Overline = True
        Else
            dgPreview.ItemStyle.Font.Overline = False
        End If

        If cbItemUnderline.Checked = True Then
            dgPreview.ItemStyle.Font.Underline = True
        Else
            dgPreview.ItemStyle.Font.Underline = False
        End If

        If cbItemStrike.Checked = True Then
            dgPreview.ItemStyle.Font.Strikeout = True
        Else
            dgPreview.ItemStyle.Font.Strikeout = False
        End If

When that is executed, all the lines either are underlined, overlined, or 
line-throughd.  

Thanks for the help

Sibrwulf

  Return to Index