please exaplain gridview and what are the process available
for it. how to add the row number automatically? is it
possible to add child controls ?
Answers were Sorted based on User's Feedback
Answer / subodh kumar
Gridview is a control provided in .net2.0 and above.
Gridview is use to display the records in tabular format.
To fill the record in Gridview control we will use the
following two properties:
1. Gridview1.DataSource=<DataSet or any other datasource>
2. Gridview1.Databinding();
Gridview supports the functionality to add, edit, or delete
the record.
It also suports pagination functionality.
It have the following events which are very usefull:
1. OnDatabind
2. OnItemCommand
3. OnIndexChange
etc.
You can add the child control in Gridview and you can
handle that event through Gridview event handle
i.e. "OnItemCommand". This process is called "Bubble event".
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / siva
The above said is write. With addition to that To add the
row number automatically See the below code.
<asp:TemplateField HeaderText="S.No">
<ItemTemplate >
<%# Container.DataItemIndex + 1 %>
</ItemTemplate>
</asp:TemplateField>
| Is This Answer Correct ? | 1 Yes | 0 No |
What are generations and how are they used by the garbage collector?
What is difference between Trace and Debug
Can you prevent your class from being inherited and becoming a base class for some other classes?
Describe ado.net?
What?s a multicast delegate?
What is data reader in c#?
What are the Features in .net framework 1.1
Is XML case-sensitive?
Can fields inside a class be virtual?
From which base class do all Web Forms inherit from?
What is a .aspx file?
How to assign Null value to Var?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)