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
in which protocol ASP.NET WEB API Work?
How is a session stored and maintained in asp.net?
Explain the asp.net mvc request life cycle? : asp.net mvc
Is it possible to apply themes to an asp.net application? If yes, then how?
i want the asp.net technical questions and answeres
What are the types of authentication in asp.net?
What does the hotspot class in .net do?
How can you pass multiple complex types in Web API?
What is asp.net caching?
What is the difference between application state and caching?
What is css and what is it used for?
What is data caching?
What is mvc in asp.net tutorial? : Asp.Net MVC
Which object is used to encapsulate the state of the client and the browser in ASP.NET?
What is the advantage of mvc over asp.net? : Asp.Net MVC