DevExpress GridControl sorted list

How to get a list of items, that is in sorted gridControl?

I need to create a new List with only values, sorted by GridControl.

Answers


probably not the most elegant solution but as found on the devexpress site because i hit the same problem a while a go:

the main gridview of the gridcontrol has a property DataRowCount, so you could do this;

List<DataRow> dataRows = new List<DataRow>();
for (int i = 0; i < gridView1.DataRowCount; i++) {
    DataRow row = gridView1.GetDataRow(i);
    dataRows.Add(row);
}

and then you can do whatever, or select a value from the row before you add it to an collection while using the column header:

object result = gridview1.GetDataRow(i)["ID"];

Need Your Help

QTableWidgetItem performance

python pyqt4 qtablewidgetitem

I put some text in QTableWidget's cells, like this:

Video Player Null Pointer Exception using Google Media Framework Exoplayer

java android json android-video-player exoplayer

I am using GMF sample to play Video in my app, where I am fetching video title and url from live JSON, here is the sample of my JSON :