Datagrid and text selection

  • Thread starter Thread starter C-Services Holland b.v.
  • Start date Start date
C

C-Services Holland b.v.

Hi all,

I've got a datagrid which is readonly and is used to list a resultset
from a query. From this set the user can select one and details of that
show up. What annoys me is that I can't seems to get rid of the text
selection stuff. If you click in the grid on any text it selects it,
navigating the grid with your keyboard shows a gray background for the
cell and a blue selection for the text in that cell.

Now the gray background is basically all I want. How do I get rid of
that blue selection?
 
Rinze,

Is this 2005 because you are talking about a resultset?
I get tabbing through the dataset all blue selected fields.

Cor
 
If you set enabled=False then you can't select a cell. I guess I'm
looking for behaviour like the old FlexGrid. Click a cell and the entire
cell is blue, not just the text with a gray background.
 
No, I'm using 2002. I gues I should have said dataset which is bound to
the datagrid.
 
Rinze,

I am using 2003 and get all blue selections when I tab through the datagrid
using the keyboard, did you something special or maybe it is something from
2002 what I cannot see now.

Cor

"C-Services Holland b.v."

...
 
Cor said:
Rinze,

I am using 2003 and get all blue selections when I tab through the datagrid
using the keyboard, did you something special or maybe it is something from
2002 what I cannot see now.

Cor

"C-Services Holland b.v."

..
No, I'm using 2002. I gues I should have said dataset which is bound to
the datagrid.

Cor Ligthert wrote:

I've found some screenshots on the web to clarify. Since this PC isn't
connected to the LAN I have to do it like this.

I want it to look like this when navigating:
http://samples.gotdotnet.com/quickstart/CompactFramework/images/datagrid_editing.jpg

but I get something like this:
http://www-900.ibm.com/developerWorks/cn/dmdd/library/techarticles/0305swart1/images/Swart-K.jpg
But with the background of the cell being gray, not white.

Obviously, the second one would be ok if the cell is editable. But Since
my datagrid is readonly, the cell isn't editable and I would like to see
it displayed as in the 1st example.

Hope this makes sense
 
Rinze,

The first one is a compact framework datagrid I assume you are using a PC
and not a palmkind of device?

The second question is are you using datagridcolumnstyles?

Cor
 
Cor said:
Rinze,

The first one is a compact framework datagrid I assume you are using a PC
and not a palmkind of device?

The second question is are you using datagridcolumnstyles?

Cor
I'm using a PC yes, but that image was just to illustrate what I want
the cell to look like.

No, just a tablestyle. Can this look be achieved with columnstyles? If
so, how?

TIA
 
Rinze,

I can not get the behaviour as you have therefore I asked if you used
columnstyles and tried it with that but did not find a simple answer.

You can try if you find it on this page.
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q900q

I have taken a part what looks as your problem however this is more the page
"Everything you always wanted to know about the datagrid"

When you cannot find it, ask it again when you see that Ken Tucker is (very)
active, he is the one who mostly answers as well this kind of questions.

Cor
 
Cor said:
Rinze,

I can not get the behaviour as you have therefore I asked if you used
columnstyles and tried it with that but did not find a simple answer.

You can try if you find it on this page.
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q900q

I have taken a part what looks as your problem however this is more the page
"Everything you always wanted to know about the datagrid"

When you cannot find it, ask it again when you see that Ken Tucker is (very)
active, he is the one who mostly answers as well this kind of questions.

Cor

Thanks,
option 5.41 solved my problem :) I just hoped there was a simple toggle
in the datagrid class that did the same, but you can't have it all I guess.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top