Tuesday 15 July 2014

c# - How to Set Grid View Header Text As I Am Attaching list to Grid? -


I am trying to add a list to the grid view, but its title can not be set to text, which Showing the "item" in the article, set its header as my code,

  GridView1.DataSource = M5h; GridView1.DataBind ();   

I have also experimented with this template column but it also does not work, I delete the add index directly as a data source

It looks like

  items 0.5 0.6 12 .36 0.46 0.8 0.9 11 2.1 1.23   

Thanks for your advice Thanks in advace

Edit:

  & lt; Asp: gridview id = "gridview 1" runat = "server" & gt; & Lt; / ASP: GridView & gt;    

try it

  & lt; Asp: GridView id = "gridview 1" runat = "server" autogrentechls = "false" & gt; & Lt; Columns & gt; & Lt; Asp: boundfield datfilled = "YourColumnDataField" header text = "item" /> & Lt; / Column & gt; & Lt; / ASP: GridView & gt;    

No comments:

Post a Comment