473,320 Members | 2,006 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,320 software developers and data experts.

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 2031

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rxd | last post by:
I have a Datagrid that should have a couple of hidden columns. I used a DataGridTableStyle to hide the columns and it was working fine except I needed to prevent the DataGrid from allowing new rows...
3
by: melanieab | last post by:
Hi, I'm programatically sorting in a datagrid. When a column header is clicked, the sort happens twice for some reason, making it looks like it only sorts in descending order. I can tell it...
2
by: Simon | last post by:
I have read most messages in regard with this topic, and have tried every measure suggested. I'm still haveing problem to get it to work. Basically, the page just reloaded as before when I clicked...
2
by: Hajime Kusakabe | last post by:
Hi. I have created a datagrid (datagrid1) without any columns on a aspx page. Then aspx.vb adds columns from a database. It is somthing like this .... ================================== Dim...
1
by: Jeremy | last post by:
I want my gird to sort only the items on the current page when I click on a column header. I wrote a little test app, but when I sort it pulls in items from other pages and places them on the current...
4
by: Mark Travis | last post by:
Hi all, I have written a simple Web Application that displays a query result onto a page using the ASP DataGrid. To Digress ======= Development information about the page is as follows 1....
3
by: elziko | last post by:
I have a DataTable bound to a DataGrid. When a user clicks on a row on the DataGrid I use: MyDataTable.Rows(MyDatagrid.CurrentRowIndex).Item(0) to do some work with the value in the first cell...
2
by: Kuldeep | last post by:
Hi All, I have been trying to find some algorithms for datagrid sorting and paging. Please help Regards Kuldeep
1
by: richard | last post by:
OK, I have got bi-directional datagrid sorting down, have a created a nice sorting class. My question, how can I add sorting to more than one datagrid on the same page? Everything I have tried has...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.