Reputation: 61
the code to get the database and show it on the datagrid in this image
as shown in the image it duplicate the columns ,one with renamed headers and the other one with same headers from database table
I just want those with renamed headers without duplicate ?
Upvotes: 0
Views: 176
Reputation: 305
Use AutoGenerateColumns = "false".
<asp:GridView ID="GridView1" runat="server" DataSourceID = "SqlDataSource1" AutoGenerateColumns = "false">
Upvotes: 1
Reputation: 71
Set AutoGenerateColumns to false. You have prepared your columns in xaml so you do not want to code generate them for you
Upvotes: 3