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 viewstate? In which event of the page life cycle, is the viewstate available?
What is the mvc framework?
What is inproc mode in session?
Where session variables are stored?
What is cookies in asp net?
What is a postback url?
What is the use of session state and application state and difference between them?
How to disable validator control by client side JavaScript?
What is Pre-Render event in ASP.NET?
Do gac'ed assemblies have fulltrust?
What are the two types of web pages?
Explain significance of routing? : asp.net mvc
Explain difference betn dataset and recordset?
Explain the difference between asp & asp.net.
Define dll hell?