Data Web Controls - asp.net

In a repeater control can we achive both sorting and grouping together, If possiple plz guide me the way.
If not, what is the best control to obtain just sorting and grouping.
Thank You

There is no built-in data control with grouping and sorting which works out of the box in .net framework. You need to implement sorting and grouping by yourself. As implemented solutions you can look at devexpress gridview or jquery grid plugin.
If you want to implement sorting in repeater control - look at this.

Related

control that has paging but supports custom format

i need to know what control in asp .net 2.0 to use to get this layout:
i need to display 8 videos at a time using 2 rows with 4 columns, but the control should also have paging (to display 8 items per page).
i've thought of using a formview but the paging for formview is per one article content / datarow only.
i'm also thinking of using gridview but i am not so sure if i can get this layout.
any thoughts please.. very much appreciated.. thank you!
For the above scenario i think yo can make use of DataList control of ASP.NET which can help you to make the controls in columns and rows order. You will have to create a Paging Programatically.
I am giving you the link which can help you to create a paging with Repeater Control.
Preferred: http://weblogs.asp.net/scottgu/archive/2006/01/07/434787.aspx
http://www.dotnetcurry.com/ShowArticle.aspx?ID=345
http://www.developer.com/net/asp/article.php/3646011/ASPNET-Tip-Creating-Paging-for-a-Repeater-Control.htm
http://www.codeproject.com/KB/webforms/Aspnet_Repeater_Control.aspx

Ajax enabled sorting and paging on grid in ASP.NET 3.5

Is there any good solution for ajax enabled Grid with pageing and sorting which only brings the required data from database? I mean it should only bring the data from the database which is to be displayed on the particular page number of the grid.
I looked at this. It looks good. But I just thought if anyone has created something better using Google's or Yahoo's javascript library or using any good features of asp.net 3.5.
I'm replying my own question.
I found Ajax Data Controls as updated version of what I had specified in my question. Still I will not mark it as answer and will wait for better answer.
If you are using a datasource control (SqlDataSource, LinqDataSource etc) this would be done automatically (retrieving only the current page of data). To make paging and sorting ajax-enabled wrap the grid inside an UpdatePanel control.
I used devexpress grid. It has sorting, grouping and paging. It is not perfect one but looks nice and easy to use.

Sorting & Grouping in a Repeater

In ASP.NET Can we achieve both grouping and sorting in a repeater control.
If possible please suggest me the way of doing it or links ..
I have to implement that in my application
Thank You.
If you mean visual grouping, the way I have done this sort of thing in the past is to add an ItemDataBound event to the repeater which checks the previous item using MyRepeater.Items[e.Item.ItemIndex-1]. If I've determined that a new group has started (i.e., if the previous item started with a different letter than the current item, and I am sorting alphabetically and grouping by letter) then I inject the appropriate HTML markup into a Literal control in the ItemTemplate to create the visual groupings.
Couldn't you use the ListView control instead of a repeater? This has built in support for sorting and a kind of grouping whilst still offering the layout flexibility you get with a Repeater.

Why not we use Repeater Control instead of Gridview Control?

I know GridView control comes with lot of built in functionality, which we can achieve from repeater control. GridView control has performance issues. Why don't we use repeater?
You will be thinking why this question, if you can achieve the functionality and performance using repeater use it, but I want to understand why and when we should use repeater and GridView. Can anybody explain me how and when?
GridView supports a tablular style of layout. So works nicely for displaying data that would fit into a table. e.g. report style data
Repeater control is good for a more free style layout. Say for displaying products on an ecommerce website or for displaying entries on a forum or blog.
Like you said, the Repeater can perform certain aspects of the GridView. In this case, you'd want to use a Repeater. However, there are differences between the controls which cannot easily be substituted (or, necessarily, worth the time to implement). You can see a table of differences here. Knowing these differences can make it easier to decide what control to use depending on your needs.
(From Link)
The GridView : it supports paging but
it doesn't provide a flexible layout ,
since its mainly used to display the
data in a table based layout.And If we
looked at data inserting , the
Gridview doesn't have a built in
support for inserting data( since it
doesn't call the insert method of it
underlying data source when you click
on a button with a CommadName set to
"Insert" ).
The Repeater control : you will find
that it provides a flexible layout but
it doesn't support data grouping
,inserting,deleting , updating and
paging through the data .
The GridView is for tabular data only and does a lot of the work for you, like binding data automatically to columns.
The Repeater gives you more control over the result, but you have to do more because nothing gets binded automatically.
I prefer using a Repeater almost every time, but I can see the usefulness of the GridView.

Sketchflow - grid datatemplate

I am trying to do something very simple with Sketchflow.
Create a grid with data. I tried using a listbox, created a datasource, bound the datasource to the listbox...everything works fine....but am stuck when it comes to trying to customize how the data is laid out....i.e., i want to create a data-template for the listbox, and then bind data to it.
any help on this would be highly appreciated.
thanks in advance,
Sashidhar Kokku
Although you can do what you are suggesting, I suspect what you want to use is DataGrid.
For Silverlight you can find the DataGrid in the Silverlight Toolkit: http://www.codeplex.com/Silverlight
For WPF you can find the DataGrid in the WPF Toolkit: http://www.codeplex.com/wpf

Resources