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



please exaplain gridview and what are the process available for it. how to add the row number auto..

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

please exaplain gridview and what are the process available for it. how to add the row number auto..

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

Post New Answer

More C Sharp Interview Questions

What is uint64?

0 Answers  


What is the use of ienumerable in c#?

0 Answers  


What is difference between tostring() vs convert.tostring() vs (string) cast

0 Answers  


why do we use Overloading, Overriding, Boxing, Unboxing, and what is the use of these ?

3 Answers   eXensys,


If a child class instance is created, which class constructor is called first - base class or child class?

0 Answers  


In a single .NET DLL how many classes it contains?

0 Answers   Siebel,


What is strong name assembly?

0 Answers  


What is the difference between early binding and late binding in c#?

0 Answers  


What is before string in c#?

0 Answers  


What does mean before a string in c#?

0 Answers  


Is Multiple-inheritance supported by c#?

0 Answers   Siebel,


Explain about CTS?

0 Answers   Microsoft,


Categories