Which one is better...???

Posted by Somu475 under ASP.NET on 11/28/2012 | Points: 10 | Views : 892 | Status : [Member] | Replies : 8
Hi All,

If u have Some data and simply you need to display, which controls you will choose from the following:

1) Repeater Control
2) GridView Control
3) ListView Control
4) DataGrid Control

Share ur choice along with the reason for ur choice of particular control.

-Somu


Responses

Posted by: Saratvaddilli on: 11/28/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi somu,
it depends up on our requirement ,

i support for list-view because we can do datagrouping and insert operations which we can't implement using gridview .
But in listview we have write more code when compared to the gridview

Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

Somu475, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sandhyab on: 11/28/2012 [Member] Starter | Points: 25

Up
0
Down
ListView is a much better tool in regards to displaying and manipulating data. With the ListView we use templates to design the different views.ListView control can exceed the capabilities of Repeater or DataList control, but GridView still has advantage in faster implementation and short markup code. GridView's common problem is large ViewState which could cause page loads slowly.
The reason to use ListView would be if you need some special layout, for example, to create a table that places more than one item in the same row, or to break free from table-based rendering altogether) - which is not possible with GridView.


Thanks & Regards

Somu475, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Somu475 on: 11/29/2012 [Member] Starter | Points: 25

Up
0
Down
Thanks to u both for ur replies...

-Somu

Somu475, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 11/29/2012 [Member] Starter | Points: 25

Up
0
Down
@Saratvaddilli

why we cant do insert operations in gridview??....we can do it..are you sure of this?

Somu475, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vasanthmvp on: 11/29/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Oswaldlily,
GridView doesn't have any "OnRowInserting" attribute, we have to explicitly specify the row insertion functionality part from gridview, where as a ListView does have it "On Item Inserting" and also a template can be designed for item insertion using ListView.

Regards & Thanks,

Awesome Coding !! :)

Somu475, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 11/29/2012 [Member] Starter | Points: 25

Up
0
Down

@Vasanthmvp

Thnx a lot................got it :)

Somu475, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bageshkumarbagi on: 11/30/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Somu ,

It is better to use ListView control . it has user define template and table. It is very useful to you when you costmize the data in webpage.

Thanks,
Bagesh Kumar Singh
Mark as answer if you have been satisfied

Somu475, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Siba_Sahoo on: 12/4/2012 [Member] Starter | Points: 25

Up
0
Down
Basically depends n requirement.


Better to use Repeater control as it is light wet.

Somu475, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response