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


Please Help Members By Posting Answers For Below Questions

Can we use a static function with a non-static variable?

502


What is the use of web.config and machine.config files?

619


Distinguish between Server-side and Client-side code?

548


how to include timer or counting time to display next page in asp.net

1597


Explain transparent caching with aop?

515






Explain difference between dataset and recordset?

500


Explain why datareader is useful?

543


What is a session in asp.net?

528


Differentiate between namespace and assembly.

555


What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

531


Describe in brief .net framework and its components.

539


Explain the steps to be followed to use passport authentication.

581


What are the main differences between asp and asp.net?

514


Explain culture and uiculture values.

535


What is semantic gap?

613