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

localization using windows c#

2 Answers  


Are c# generics the same as c++ templates?

0 Answers  


What is thread in c#?

0 Answers  


Why we use anonymous methods in c#?

0 Answers  


In a C# class we have a SortedList member m_addinProjects we want to provide an iterator to allow the consumer of this class access to the items in the collection. Please provide an iterator method for the AnalyzeAddinsDLL class below and an example of how it would be used. namespace AnalyzeAddinsDLL { public class AllAddInProjects { private SortedList<string, AddInProject> m_addinProjects; public AllAddInProjects() { m_addinProjects = new SortedList<string, AddInProject>(); } } }

0 Answers   ABC, WinsIndia,






Explain About .NET Framework

0 Answers  


What is a HashCode?

1 Answers  


What are the types of comment in c# with examples?

0 Answers  


What is iqueryable and ienumerable in c#?

0 Answers  


What if an error occurs in Catch block, how can you prevent it?

2 Answers   IBM,


Why do we need private constructor in c#?

0 Answers  


what happens if you inherit multiple interfaces and they have conflicting method names?

0 Answers   Siebel Systems,


Categories