Datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have a datagrid being filled by a data set from an access databas

First: The Column displayed in the datagrid are sorted like "Apple", "Carrot", "Deer", "Plum", "Number

Which is not the way they are in the database

I want them to appear as Number, Deer, Plum, Carrot, Appl
Any ideas of how to get the columns with their respective data appear in the datagrid the way they appear in the access database table

Also, is there a wat to display only the last 10 rows in the database in the reverse order

The rows are entered say 1 thru 24 in the dataset/database. I want to display in the datagrid 24 thru 1
Thanks for any suggestions
 
Check the TabeStyles in properties pane of datagrid,
first add a style, select a mapping name then add your columns respectively
in the order you want to see,

Adriano

Kelly said:
Hi
I have a datagrid being filled by a data set from an access database

First: The Column displayed in the datagrid are sorted like "Apple",
"Carrot", "Deer", "Plum", "Number"
Which is not the way they are in the database

I want them to appear as Number, Deer, Plum, Carrot, Apple
Any ideas of how to get the columns with their respective data appear in
the datagrid the way they appear in the access database table
Also, is there a wat to display only the last 10 rows in the database in the reverse order

The rows are entered say 1 thru 24 in the dataset/database. I want to
display in the datagrid 24 thru 15
 
Hi Kelly,

Please do not connect questions to questions? Create a new question?

The OP original poster will think it is an answer as it is as well in the
Google Search.

And as answer on your question have a look at the dataview class

http://msdn.microsoft.com/library/d...ef/html/frlrfSystemDataDataViewClassTopic.asp

You need from that the rowfilter and the sort.

Although I think that for that non sequential sort you will need to make an
extra column in your datatable.

I hope this helps?

Cor
 
Back
Top