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


Please Help Members By Posting Answers For Below Questions

What is difference between or and orelse?

733


How do I publish my asp.net application to my isp's web server?

785


What is break mode?

708


What is page fragment caching?

715


What is asp net theme?

722


What are the session variables?

699


How to use push notification?

793


What are the 3 levels at which content pages can be attached to Master Page?

782


How does viewstate work?

778


List the asp.net validation controls?

691


What are the advantages and limitations of query string?

790


What are the different ways you would consider sending data across pages in ASP (i.e between asp to asp)?

747


Explain cashing in asp.net.

710


Define asp.net caching?

752


What is a uri query?

747