DataGrid - Cell && Sorting

  • Thread starter Thread starter Sargas Atum
  • Start date Start date
S

Sargas Atum

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.
 
Sargas Atum said:
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
 
Back
Top