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
What is comparevalidator?
How to find out what version of asp.net I am using on my machine?
Explain the asp.net mvc request life cycle? : asp.net mvc
How does the service stream content?
Explain difference between dataset and datareader?
Which platform does Microsoft .NET use for exchanging data between applications?
How many web config files can be created for an application?
Explain the asp.net mvc folder conventions? : asp.net mvc
What is a web api?
What are sql notifications and sql invalidations?
What is clickid?
How can you ensure a permanent cookie?
Describe a Windows Service and its lifecycle ?
Explain the advantages of caching?
What is httpresponse?