What tags do you need to add within the asp:datagrid tags to
bind columns manually?
Answer Posted / anand gopal makwa munger
First set AutoGenerateColumn False and write code like given below.Suppose you want to bind ID and name.
<asp:DataGrid ID="Datagrid1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundColumn DataField="Id" HeaderText="ID"></asp:BoundColumn>
<asp:BoundColumn DataField="Name" HeaderText="Name"></asp:BoundColumn>
</Columns>
</asp:DataGrid>
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Give an example of cookie abuse.
What is the difference between CC and BCC?
What are the advantages and limitations of query string?
Can you change a Master Page dynamically at runtime?
What is latest version of asp.net mvc? : Asp.Net MVC
Is it right that ASP.NET Web API has replaced WCF?
How to integrate angular 8 with asp.net mvc 5? : Asp.Net MVC
What are the different types of Caching techniques in ASP.NET?
In which event are the controls fully loaded?
Explain the difference between array and linkedlist?
What is the difference between asp.net and mvc?
How does asp net store session ids by default?
What is application state?
Explain repository pattern in asp.net mvc? : asp.net mvc
What happens if an ASP.NET server control with event-handling routines is missing from its definition?