473,378 Members | 1,314 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,378 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 5234
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.