CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008
    Posts
    70

    Changing HeaderText of datagrid programatically

    Hi
    I am using Net framework 2 - I want to programatically (RUN TIME) change the headertext of my datagrid (ASP.NET 2.0),
    any idea pl help
    VB.Net 2005, Net Framework 2.0

  2. #2
    Join Date
    Jul 2008
    Posts
    21

    Re: Changing HeaderText of datagrid programatically

    You can do so in the following way:
    gv_AddFiles.DataSource = dt;
    gv_AddFiles.Columns[0].HeaderText = "Remaining files";
    gv_AddFiles.DataBind();
    Here gv_AddFiles is the id of a datagrid and dt is the datatable to which the datagrid is going to be bound to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured