Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Keeping Cells from getting Focus?

Reply
Thread Tools

Keeping Cells from getting Focus?

 
 
Josh Grameson
Guest
Posts: n/a
 
      05-08-2006
I have a datagridview with some row that I want only to display. Which is
fine cause I make them readonly. But I would like that you can't land in
those cells as well. Is this possible?


 
Reply With Quote
 
 
 
 
Ken Cox - Microsoft MVP
Guest
Posts: n/a
 
      05-09-2006
A control with an tabindex value of minus one (-1) is passed over in the tab
sequence.

Is there a way you can put this in as an attribute for the control?

tabindex="-1"

"Josh Grameson" <> wrote in message
news:6LQ7g.164283$ ...
>I have a datagridview with some row that I want only to display. Which is
>fine cause I make them readonly. But I would like that you can't land in
>those cells as well. Is this possible?
>



 
Reply With Quote
 
 
 
 
Josh Grameson
Guest
Posts: n/a
 
      05-09-2006
I understand that each control has a tabindex. But in this case wouldn't the
control be the DataGridView itself, not the individual cells? I don't want
to avoid focus to any of the DataGridView cells but to certain columns.


"Ken Cox - Microsoft MVP" <> wrote in message
news:...
>A control with an tabindex value of minus one (-1) is passed over in the
>tab sequence.
>
> Is there a way you can put this in as an attribute for the control?
>
> tabindex="-1"
>
> "Josh Grameson" <> wrote in message
> news:6LQ7g.164283$ ...
>>I have a datagridview with some row that I want only to display. Which is
>>fine cause I make them readonly. But I would like that you can't land in
>>those cells as well. Is this possible?
>>

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      05-09-2006
You heed to handle either ItemDataBound or PreRender event. In the event
handler you can access individual rows and their cells. Set Enabled=false
for the cells you want to disable.

Eliyahu

"Josh Grameson" <> wrote in message
news:6LQ7g.164283$ ...
>I have a datagridview with some row that I want only to display. Which is
>fine cause I make them readonly. But I would like that you can't land in
>those cells as well. Is this possible?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert yyyymmdd text cells into date cells =?Utf-8?B?ZF9jYW1wZWxvQGhvdG1haWwuY29t?= Microsoft Certification 2 11-22-2006 04:52 PM
Writing to Cells in the Detailsview Insertmode makes cells uneditable. SixStringSlaya@gmail.com ASP .Net 0 02-28-2006 10:23 PM
any Tips for keeping CDs from getting SCARTCHED up? baaas Computer Support 11 04-01-2005 01:06 PM
Datagrid Cells: Getting the value ALPO ASP .Net 3 11-22-2003 09:12 PM
Cells[].Text or Cells[].Controls[0] Joel Finkel ASP .Net Datagrid Control 0 09-01-2003 04:42 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57