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
What is state management react?
How to reduce the width of textbox in editcommandcolumn of datagrid?
Which is faster viewdata or viewbag?
What is role-based security in asp.net?
What’s the use of “GLOBAL.ASAX” file?
How you can access the values from the Repeater control in ASP.NET?
Explain asp.net mvc request life cycle? : asp.net mvc
Explain the flow of processing of the request? : asp.net mvc
How can we update records in gridview?Is there any appropriate code for it?
3. What goals do you have in your career?
What is razor? : asp.net mvc
What is AutoEventWireup attribute for ?
How to you can limit Access to Web API to Specific HTTP Verb?
What are Authentication and Authorization?
What is custom events? How to create it?