Questions tagged [gridview-sorting]

Process of data arrangement in a gridview control

It is a process of arranging the data displayed in the gridview control in ascending or descending order based on user code to suit user needs.

94 questions
103
votes
8 answers

Yii2 data provider default sorting

In Yii 1.1 this code works for default sorting: $dataProvider = new CActiveDataProvider('article',array( 'sort'=>array( 'defaultOrder'=>'id DESC', ), )); How default sorting can be set in Yii2? Tried below code, but no…
Sarvar Nishonboyev
  • 8,878
  • 7
  • 55
  • 55
13
votes
3 answers

Sorting DataTable string column, but with null/empty at the bottom

I need to sort a DataTable or DataGridView by a column that is a string value, but with null/empty values at the BOTTOM when sorting ASCENDING. The DataTable is NOT populated by a SQL statement, so no order by. If I do DataGridView1.Sort(New…
Stefan Steiger
  • 68,404
  • 63
  • 337
  • 408
10
votes
7 answers

.NET / WinForms - Clear a Sort on a DataGridView

What is the proper method to tell a DataGridView to stop sorting? I have a "screen" where I tell the grid programatically to sort by column 4 and ascending. When I switch to another area I want the same grid to come in 'default'/no sort. I'm…
BuddyJoe
  • 64,613
  • 107
  • 281
  • 451
4
votes
2 answers

CouchDB Full Text Search

i need some direction about full text search in couchdb. Is it already enabled by default in 2.0, or do we have to rebuild couchdb enabling it? Scenario: It is a document management system, documents are shown in a grid. I need to be able to sort…
4
votes
4 answers

Sorting gridview column in asp.net

I have a gridview that loads data from database. The data is displayed in the gridview for the first time sorted by datetime. On one column of that gridview I want to allow sorting, for example on the main_post column. I had tried this, but the…
Ifwat Ibrahim
  • 1,223
  • 4
  • 15
  • 27
4
votes
1 answer

Extjs4- Giving a default sort for a column after grid is loaded

After the grid has been loaded with the data, if we try to sort any column, the default direction is ascending. Can we define a default sort for grid column such that after I load the grid, if I click on that column, it should get sorted in…
user2316489
  • 159
  • 1
  • 4
  • 14
4
votes
1 answer

C# DataGridView virtual mode: Enable sorting

Is there a way to sort a DataGridView in virtual mode? I have implemented a Gridview in virtual mode following this microsoft example: http://msdn.microsoft.com/de-de/library/ms171624.aspx . Also I have modified the example to be able to write data…
Chris
  • 695
  • 8
  • 21
3
votes
1 answer

Gridview RowCommand event is fired when I do sorting in gridview

I am trapped in some abnormal problem. When I do sorting in gridview, it fires RowCommand event for that grid instead of sorting event. Below is the HTML code for my grid view.
Microsoft Developer
  • 4,393
  • 20
  • 87
  • 136
3
votes
1 answer

dhtmlxGrid How to select the value for sorting?

I've been playing with the filtering and sorting in dhtmlxGrid (https://dhtmlx.com/docs/products/dhtmlxGrid/samples/08_filtering/01_pro_filter.html) and I have a question: Can we sort the column with the employees' names by the last names without…
3
votes
1 answer

C# infinite loop when sorting GridView

I want to sort my GridView in the CodeBehind but my sorting methode give me an infinite loop. My GridView, for testing, look like:
Félix LD
  • 366
  • 1
  • 5
  • 19
3
votes
2 answers

How do you enable Sorting in a DataGridView with an assigned DataSource?

On several recommendations, I started to assign a DataSource to my DataGridView instead of using DataGridView.Rows.Add(...). This is convenient since my data source is already a big list which doesn't change (much). However, when I use the…
Yellow
  • 3,559
  • 6
  • 35
  • 66
2
votes
1 answer

how to sort datagridview ignoring blank rows

I am using a DataGridView control in WinForms to populate data. While sorting it, it considers blank rows as well. I want to move those blank lines to the bottom of the grid. Whatever the sort criteria is. Please help to do this? This is on the…
Vijay Balkawade
  • 3,574
  • 12
  • 49
  • 87
2
votes
1 answer

How to sort a GridView with a ColumnHeader click when AutoGenerateColumns="true"

I have a gridview with AutoGenerateColumns="true" (in general I don't know what the columns will be). Is there any easy way to sort the grid by clicking on a column header? The only solutions I have found so far are for when…
openshac
  • 4,245
  • 5
  • 41
  • 69
2
votes
1 answer

GridView ASP.NET Sorting

I have an ASP.NET GridView that just won't sort! I'm sure that I am missing something pretty obvious. Page.aspx
RSolberg
  • 26,165
  • 22
  • 113
  • 157
2
votes
3 answers

GridView sorting works once only

I have a grid and it is sorting once only in ascending order. Then nothing happens. Code of aspx file:
asma
  • 2,677
  • 13
  • 57
  • 87
1
2 3 4 5 6 7