Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to access dynamically created Gridview HeaderRow

How to access dynamically created Gridview HeaderRow

Scheduled Pinned Locked Moved ASP.NET
questiontutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KittyKit
    wrote on last edited by
    #1

    In my scenario, I need to group the products based on category. The "main" header has columns Product name, Description, Unit and Unitprice. I am programatically adding "secondary" / "sub" header for each cateogry and list the respective product underneath. I overrode the render function like this GridViewRow NewHeader = new GridViewRow(rowIndex + 1, rowIndex + 1, DataControlRowType.Header, DataControlRowState.Normal); GridView1.Controls[0].Rows.AddAt(rowIndex + 1, NewHeader); The gridview is created as wished - First appears the main header. And Comes the first sub header followed by the related product rows and then comes the next subheader followed by the corresponding product rows at it goes on. I want to know how can I access these dynamically created "sub header"s. Gridview1.rows collection has only the data rows and the Gridview1.headerrow has only the default headerr row. Is there a way to access my "sub"header rows? Thanks Kit

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups