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 HTTPModule and HTTPcontext? What is the use of each?
Which protocol is used to call a web service?
Describe the master page.
What is sql data source control in asp.net?
What is css and what is it used for?
What are the uses of reflection?
Describe how passport authentication works.
Explain Features in ASP.NET
What does uri mean?
Why we use dbms for projects? Why don’t we save any application data in separate files instead of dbms?
What are server side controls?
How does session authentication work?
Which authentication uses a combination of windows and iis authentication?
Explain the difference between or and orelse?
What is the use of dispose method?