Home > How To > How To Create Table Header At Runtime In Asp.net

How To Create Table Header At Runtime In Asp.net

F-111: Emergency landing with no wheel "Draw a million dots:" How to respond to a ridiculous request from a senior colleague? I need some help in how to add header name and text box control to table dynamically?? This property is used primarily by control developers.(Inherited from WebControl.)TemplateControlGets or sets a reference to the template that contains this control. (Inherited from Control.)TemplateSourceDirectoryGets the virtual directory of the Page or See more: C# ASP.NET How to create table dynamically in codebehind and table data come from database. have a peek here

Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. Is an open-source software contributor a valid work reference? How to Protect Against FTL Sneak Attacks How to tell if I'm actually in a symlink location from command line? Learning resources Microsoft Virtual Academy Channel 9 MSDN Magazine Community Forums Blogs Codeplex Support Self support Programs BizSpark (for startups) Microsoft Imagine (for students) United States (English) Newsletter Privacy & cookies http://stackoverflow.com/questions/12201593/creating-table-header-using-c-sharp

Table1.Rows.AddAt(0, headerRow); // Create a TableFooterRow. Solution 1 Accept Solution Reject Solution Hi Here I'm posting some sample code for that check it once string tablestring=""; //dt is datatable object which holds DB results. Smithd647 I was very pleased to discover this website.

TableHeaderCell headerTableCell1 = new TableHeaderCell(); TableHeaderCell headerTableCell2 = new TableHeaderCell(); TableHeaderCell headerTableCell3 = new TableHeaderCell(); headerTableCell1.Text = "Column 1 Header"; headerTableCell1.Scope = TableHeaderScope.Column; headerTableCell1.AbbreviatedText = "Col 1 Head"; headerTableCell2.Text = "Column See AlsoTableFooterRowTableSystem.Web.UI.WebControls NamespaceTable, TableRow, and TableCell Web Server Control OverviewReturn to top Show: Inherited Protected Print Export (0) Print Export (0) Share IN THIS ARTICLE Is this page helpful? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed See ASP.NET Ajax CDN Terms of Use – http://www.asp.net/ajaxlibrary/CDN.ashx. ]]> view model not available or IncludeLegacyWebTrendsScriptInGlobal feature flag is off]]> Blog Sign in Join ASP.NET Home Get Started Learn

To elaborate on his answer, it seems you can even achieve this declaratively by setting the TableSection property in your markup, without code behind: