What tags do you need to add within the asp:datagrid tags to
bind columns manually?

Answer Posted / nazakat ali

Set AutoGenerateColumns Property to false on the datagrid tag and then use Column tag and an ASP:databound tag
< asp:DataGrid runat="server" id="ManualColumnBinding" AutoGenerateColumns="False" >
< Columns >
< asp:BoundColumn HeaderText="Column1" DataField="Column1"/ >
< asp:BoundColumn HeaderText="Column2" DataField="Column2"/ >
< /Columns >
< /asp:DataGrid >


<asp:DataGrid id=ManualColumnBinding runat="server" AutoGenerateColumns="False">
<COLUMNS> <asp:BoundColumn HeaderText="Column2" DataField="Column2"></asp:BoundColumn>
</asp:DataGrid>

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How response object is related to asp's response object?

689


is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?

2156


can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?

1932


Which control has default post back is enabled(true)?

802


Does asp.net still recognize the global.asa file?

722


What is considered a service provider?

709


Define msil.

733


COM+ Used ________________ Isolation Level

1707


What does occur first in ASP.Net, Authentication or Authorization?

760


What is globalization and localization in asp net?

688


Can you change a Master Page dynamically at runtime?

757


What are the modes of updation in an updatepanel?

726


9. Why should we hire you over the others waiting to be interviewed?

2446


Explain global assembly cache.

764


What is a Cookie? Where is it used in ASP.NET?

821