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 application variable in asp.net?
Why we use content place holder in asp.net?
List some of the important session state modes of asp.net.
Why select Web API?
Explain what is event bubbling?
Let's say I have an existing application written using vb6 and this application utilizes windows 2000 com+ transaction services. How would you approach migrating this application to.net?
What is meant by server side scripting?
Why mvc is better than asp.net? : Asp.Net MVC
What is the extension of master page in asp.net?
What is asp.net and how it works?
What is synchronous and Asynchronous post back ?
Which method do you use to kill explicitly a users session?
If you want to write your own dot net language, what steps you will you take care?
Explain method to handle error using HttpError in Web API?
How is the asp.net mvc architecture different from others? : asp.net mvc