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 the difference between cache and cookies?
Do you know about caching with the datasource controls?
What is the difference between response.redirect and server.transfer?
How can we communicate with each server in N-tier Architecture? and what are the methods?
Is it right that ASP.NET Web API has replaced WCF?
Explain the steps to be followed to use passport authentication.
How you can access the values from the Repeater control in ASP.NET?
How is application management and maintenance improved in asp.net 2.0?
How can I open ashx file in mobile?
Why is the standalone environment only useful during the development process?
Give me one example of Web API Routing?
What is the recommended approach for asp.net mvc to globally intercept exceptions? What other functionality can be implemented with the approach? : Asp.Net MVC
How dataadapter.fill works?
What is the difference between user control an custom control?
What is autopostback in dropdownlist in asp net?