473,395 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Re: DataGridView, Custom Buisness Object, And Sorting

On 2008-04-22, Tom Shelton <to*********@YOUKNOWTHEDRILLcomcast.netwrote:
Ok... I haven't really used the DataGridView before - I've always used
a third party grid, but I now have a project were I have to use this
particular control. I've been searching the documentation, the web, etc
- and as near as I can tell I'm doing everything correctly - but, I can
not get the sorting working correctly.
Nevermind... My needs were simple, so I just changed all the columns to
Programmatic and am handling the sorting myself :)

--
Tom Shelton
Jun 27 '08 #1
5 807
Tom,

Did you not forgot the bindingsource, AFAIK is this a kind of healing for
all kind of problems.

http://msdn2.microsoft.com/en-us/lib...ingsource.aspx

Cor
"Tom Shelton" <to*********@YOUKNOWTHEDRILLcomcast.netschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
On 2008-04-22, Tom Shelton <to*********@YOUKNOWTHEDRILLcomcast.netwrote:
>Ok... I haven't really used the DataGridView before - I've always used
a third party grid, but I now have a project were I have to use this
particular control. I've been searching the documentation, the web, etc
- and as near as I can tell I'm doing everything correctly - but, I can
not get the sorting working correctly.

Nevermind... My needs were simple, so I just changed all the columns to
Programmatic and am handling the sorting myself :)

--
Tom Shelton
Jun 27 '08 #2
On 2008-04-23, Cor Ligthert[MVP] <no************@planet.nlwrote:
Tom,

Did you not forgot the bindingsource, AFAIK is this a kind of healing for
all kind of problems.

http://msdn2.microsoft.com/en-us/lib...ingsource.aspx

Cor
No. I tried that as well. Same result :) But, thanks.

--
Tom Shelton
Jun 27 '08 #3
Tom Shelton wrote:
On 2008-04-23, Cor Ligthert[MVP] <no************@planet.nlwrote:
>Tom,

Did you not forgot the bindingsource, AFAIK is this a kind of
healing for all kind of problems.

http://msdn2.microsoft.com/en-us/lib...ingsource.aspx

Cor

No. I tried that as well. Same result :) But, thanks.
Tom, maybe you need to override/implement the SortDirectionCore property of
BindingList? It always returns Ascending by default.

Jun 27 '08 #4
On Apr 22, 10:00*pm, "Steve Gerrard" <mynameh...@comcast.netwrote:
Tom Shelton wrote:
On 2008-04-23, Cor Ligthert[MVP] <notmyfirstn...@planet.nlwrote:
Tom,
Did you not forgot the bindingsource, AFAIK is this a kind of
healing for all kind of *problems.
>http://msdn2.microsoft.com/en-us/lib....forms.binding...
Cor
No. *I tried that as well. *Same result :) *But, thanks.

Tom, maybe you need to override/implement the SortDirectionCore property of
BindingList? It always returns Ascending by default.
hmmm... maybe. I'll look at that. Thanks.

--
Tom Shelton
Jun 27 '08 #5
On 2008-04-23, Steve Gerrard <my********@comcast.netwrote:
Tom Shelton wrote:
>On 2008-04-23, Cor Ligthert[MVP] <no************@planet.nlwrote:
>>Tom,

Did you not forgot the bindingsource, AFAIK is this a kind of
healing for all kind of problems.

http://msdn2.microsoft.com/en-us/lib...ingsource.aspx

Cor

No. I tried that as well. Same result :) But, thanks.

Tom, maybe you need to override/implement the SortDirectionCore property of
BindingList? It always returns Ascending by default.
Steve! You are the Man! That was it. A couple of lines of code, and
bling - it works.

Thanks. I'm going to have to read those docs a tad closer next time :)

--
Tom Shelton
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: rob | last post by:
I have a class that among others exposes a string property "Date". The date in this property is stored in the form yyyymmdd. Now I do the following 1) Generate a DataGridViewTextBoxColumn column...
2
by: mark carew | last post by:
Hi All DataGridView Users. I have noticed that there seems to be very little useful response to DataGridView questions in this news group. I have looked at the spanish, belgium, french, italian...
4
by: Chris Botha | last post by:
VS2005 and I have a DataTable displayed in a DataGridView that needs custom sorting, with the DataSource of the grid set to the DataTable and the SortCompare event just won't fire. Then I found...
4
by: Matt | last post by:
I have been searching all over the web for a way to sort a DataGridView based on the actual text being shown in a ComboBox column as opposed to the underlying value (an ID in this case). Can anyone...
7
by: Mitchell S. Honnert | last post by:
Is there an equivalent of the DataGrid's DataGridTableStyle for the DataGridView? If not, is there an easy way to duplicate the DataGridTableStyle's functionality for the DataGridView? Here's...
4
by: ReneMarxis | last post by:
Hello i have one problem with sorting in an unbound DataGridView. I set sorting to automatic but i get errors when having DBNull values in the column that gets sort ("Object must be of type...
7
Plater
by: Plater | last post by:
I am having trouble determining when my DataGridView object is sorting (based on a column header click). The idea is, in a large table, sorting the columns takes time, so I show a splash screen....
0
by: Queez | last post by:
OK, this is rediculous... Surely, sorting should be one of the easiest things with the ASP.NET DataGridView control. I mean, there's hundreds of sites out there (Microsoft MSDN entries included)...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.