Gridview - vb.net

Last post 02-24-2009 3:17 AM by Qin Dian Tang - MSFT. 2 replies.

Sort Posts:

  • Gridview - vb.net

    02-19-2009, 4:20 PM
    • Member
      7 point Member
    • germaine84
    • Member since 11-05-2008, 9:24 PM
    • Posts 53

    I have a gridview checkbox column and I want to add information to the HeaderText...

     how do I do that.  I want to add the date after the word Monday.

     

    <asp:TemplateField HeaderText="Monday" >

    <ItemTemplate>

    <asp:CheckBox id="day2" runat="server" />

    </ItemTemplate>

    </asp:TemplateField>

  • Re: Gridview - vb.net

    02-19-2009, 4:26 PM
    • All-Star
      21,097 point All-Star
    • bullpit
    • Member since 06-29-2006, 3:59 PM
    • Posts 4,665
    <asp:TemplateField>                    
          <HeaderTemplate>                       
              Monday
          </HeaderTemplate>
          <ItemTemplate>
               <asp:CheckBox ID="day2" runat="server" />
          </ItemTemplate>                    
    </asp:TemplateField>
                    
    
     
     
  • Re: Gridview - vb.net

    02-24-2009, 3:17 AM
    Answer

    Hi germaine84,

    You can access the HeaderText like this:

    GridView1.HeaderRow.Cells(0).Text = "Monday" + date   'set the cell index to the real index

    Thanks,

    Qin Dian Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (3 items)