|
Article relates to
|
RadControls for WinForms Q3 2008 SP2
|
|
Created by
|
Martin Vassilev
|
|
Last modified
|
Feb. 19, 2008
|
|
Last modified by
|
Martin Vassilev
|
HOW-TO
Implement custom sorting by DisplayMember instead of the default ValueMember
DESCRIPTION
Currently, RadGridView supports header click sorting that sorts data based on the cell values. This behavior is not suitable when you want to sort a ComboBox/Lookup column based on its displayed content instead their values.
SOLUTION
You could use custom sorting to change this default behavior. You only have to set
CustomDataOperation property of your combo/lookup column to Sort and to subscribe for RadGridView's CustomSort event where you should implement your sort logic.
Here is some example code:
VB.NET
C#
Please
Sign In
to rate this article.