469,908 Members | 2,041 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,908 developers. It's quick & easy.

DataGrid - Cell && Sorting

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
1 1870

"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.

Similar topics

3 posts views Thread by melanieab | last post: by
2 posts views Thread by Simon | last post: by
2 posts views Thread by Hajime Kusakabe | last post: by
1 post views Thread by Jeremy | last post: by
4 posts views Thread by Mark Travis | last post: by
3 posts views Thread by elziko | last post: by
2 posts views Thread by Kuldeep | last post: by
1 post views Thread by richard | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.