473,385 Members | 1,396 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,385 software developers and data experts.

Single column sort in windows forms datagrid.

Hello,
I am trying to have only one column sortable within a
data grid. I know you set the allow sorting property to
true on the style, but this enables sorting for all
columns. Is there a way to override this implementation
so that only a few or one of the columns may be sorted?

thanks,
-brett
Jul 21 '05 #1
3 5236
Instead of having the columns created for you at run-time, you'll need to
manually set up the columns at design-time.

"Brett P." <br********@tlc.state.tx.us> wrote in message
news:06****************************@phx.gbl...
Hello,
I am trying to have only one column sortable within a
data grid. I know you set the allow sorting property to
true on the style, but this enables sorting for all
columns. Is there a way to override this implementation
so that only a few or one of the columns may be sorted?

thanks,
-brett

Jul 21 '05 #2
I am setting up my columns at design time. How do I turn
off sorting for one single column? The allowsorting
property is on the table style, not on an individual
column.

thanks,
-brett
-----Original Message-----
Instead of having the columns created for you at run- time, you'll need tomanually set up the columns at design-time.

"Brett P." <br********@tlc.state.tx.us> wrote in message
news:06****************************@phx.gbl...
Hello,
I am trying to have only one column sortable within a data grid. I know you set the allow sorting property to true on the style, but this enables sorting for all
columns. Is there a way to override this implementation so that only a few or one of the columns may be sorted?

thanks,
-brett

.

Jul 21 '05 #3
As you click on each column in the DataGrid's properties builder dialog, you
need to make sure that the "sort expression" box is cleared for columns you
don't want sortable.

"Brett P." <br********@tlc.state.tx.us> wrote in message
news:05****************************@phx.gbl...
I am setting up my columns at design time. How do I turn
off sorting for one single column? The allowsorting
property is on the table style, not on an individual
column.

thanks,
-brett
-----Original Message-----
Instead of having the columns created for you at run-

time, you'll need to
manually set up the columns at design-time.

"Brett P." <br********@tlc.state.tx.us> wrote in message
news:06****************************@phx.gbl...
Hello,
I am trying to have only one column sortable within a data grid. I know you set the allow sorting property to true on the style, but this enables sorting for all
columns. Is there a way to override this implementation so that only a few or one of the columns may be sorted?

thanks,
-brett

.

Jul 21 '05 #4

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

Similar topics

3
by: Bill C. | last post by:
Hello, I know this has been discussed a lot already because I've been searching around for information the last few weeks. I'm trying to implement a DataGridComboBoxColumn class. I've found...
2
by: Jon Davis | last post by:
How do I enable my Windows Forms datagrid to sort when I click on the column header? I have a collection of custom classes that are displayed in my datagrid, and it works great except for this...
0
by: VMI | last post by:
My Windows datagrid has two columns: one with the data that the user will see (col_X) and the other one (a hidden one: col_sort) that'll be used to sort data. When a user clicks on col_X's column...
1
by: Dmitry V. Markin | last post by:
Good day! Here is my problem: I need to have a radiobutton column in my DataGrid for a representation of a bool column, where only row can be checked at one time(only one value in bool column...
2
by: Raj | last post by:
Hi, When we are sorting the DataGrid Boolean column the grid is becoming redcross. I have my own PPMIPDataGridBoolColumn class inherited from System.Windows.Forms.DataGridBoolColumn. In this...
1
by: Doug Bell | last post by:
Hi, Can you lock the colum in a datagrid so that it can not be resized by th user? Thanks Doug
1
by: Jim | last post by:
Hello, I am creating a windows form application using vb.net 2003 which displays data in a datagrid, and then, if the user wants, I produce a nicely formatted crystal report of the data. The...
6
by: Aaron Smith | last post by:
Is there a way to put a limit on the text size of a datagrid column? Thanks, Aaron -- --- Aaron Smith Remove -1- to E-Mail me. Spam Sucks.
3
by: Brett P. | last post by:
Hello, I am trying to have only one column sortable within a data grid. I know you set the allow sorting property to true on the style, but this enables sorting for all columns. Is there a way...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.