By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,133 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,133 IT Pros & Developers. It's quick & easy.

DataGrid - Cell && Sorting

P: n/a
Hi all,

1. I have a problem with cell selection in a table in a DataGrid.

I dont want that anybody writes in the cells. That was not a problem I
changed them to "read only", but if I am going to scroll the table up
and down or from right to the left the content of the active cell will
be selected as if for copy/paste.

How can I deactivate such a behaviour?

2. I have to sort the contents of each column, by default you can sort
the column just on clicking on the column head.

That works by default. I have to sort another column by the contents of
the next column, I have already written the sorting functions, the are
trivial.

The problem is by now, I can activate my sorting menu only from the
right mouse button, but I would like to do it from the left,
unfortunatly there lies already the default sorting, how can I
deactivate or overwrite default sorting at the left mouse button?

Does anybody have an example for the two problems. I suppose its not
that hard but I searched long enough and dont have any clue.

Sorry for my horrible english.

thx
a.s.

Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Sargas Atum" <at**@gmx.net> schrieb im Newsbeitrag
news:40********@news.piro.net...
Hi all,

1. I have a problem with cell selection in a table in a DataGrid.

I dont want that anybody writes in the cells. That was not a problem I
changed them to "read only", but if I am going to scroll the table up
and down or from right to the left the content of the active cell will
be selected as if for copy/paste.

How can I deactivate such a behaviour?

2. I have to sort the contents of each column, by default you can sort
the column just on clicking on the column head.

That works by default. I have to sort another column by the contents of
the next column, I have already written the sorting functions, the are
trivial.
I don't know if you can set a column to sort in DataGrid, but you can set
as datasource of your DataGrid a DataView on the DataSet

The problem is by now, I can activate my sorting menu only from the
right mouse button, but I would like to do it from the left,
unfortunatly there lies already the default sorting, how can I
deactivate or overwrite default sorting at the left mouse button?

Does anybody have an example for the two problems. I suppose its not
that hard but I searched long enough and dont have any clue.

Sorry for my horrible english.

thx
a.s.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.