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

wipro interview question on 28-Apr-10 1.what type of authentication used in web service, 2.what are type of multithreding ? 3.diff bet delegate and multithreading? 4.how to write update query trigger in stored procedure. 5. if you are so sharp then what happens when you click .net appln exe in system,who CLR get loaded. 6.how to use work flown in application. 7.what is main purpose of script manager. 8.how u handle cretical transaction. 9.how you syncronize the method from no of user, 10.how change name of shared assambly

1 Answers  


Explain About delegates

0 Answers   TCS,


What is difference between dynamic and var in c#?

0 Answers  


directcast(123.34,integer) - should it throw an error? Why or why not?

2 Answers   Wipro,


What does assert() do in c#?

0 Answers  






Is overriding of a function possible in the same class?

0 Answers  


How do I enforce const correctness in c#?

0 Answers  


Explain use of abstract and sealed classes in c#?

0 Answers  


What is the difference between readonly and constant in c#

2 Answers   Fulcrum Logic,


What are the different types of assembly?

0 Answers  


Is void a class?

0 Answers  


What is a value type in c#?

0 Answers  


Categories