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
What is Web API?
Is react a template engine?
How does the service stream content?
Which property is used to identify the Page is Post Back in ASP.NET?
What is server components?
Which is faster viewbag or viewdata?
What is the difference between client-side and server-side validations in webpages?
How would ASP and ASP.NET applications run at the same time on the same server?
What is mvc in asp.net interview question? : Asp.Net MVC
Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?
What are the different kinds of assemblies?
Why do we need asp.net?
What is asp.net web pages?
Explain what the contents of cookie?
What is the basic difference between asp and asp.net?