Databinding to collection classes, how do I sort and set data keys?

C

Cole Trickle

Hi all,
I have a two classes Course.cs and Courses.cs. Courses is a collection class
of Course objects stored in an ArrayList. My Course object has two
properties Reference and Version that together form the key for the database
table from which they are extracted.

Now I can happily databind to this collection class but what do I set as the
DataKeyField property?
How can I sort this datagrid as all of the example code seems to access the
database directly, not through a business logic layer?

Any help would be appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,080
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top