Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / DataGrid / May 2006

Tip: Looking for answers? Try searching our database.

Keeping Cells from getting Focus?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Josh Grameson - 09 May 2006 00:46 GMT
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?
Ken Cox - Microsoft MVP - 09 May 2006 04:14 GMT
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"

>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?
Josh Grameson - 09 May 2006 04:27 GMT
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.

>A control with an tabindex value of minus one (-1) is passed over in the
>tab sequence.
[quoted text clipped - 6 lines]
>>fine cause I make them readonly. But I would like that you can't land in
>>those cells as well. Is this possible?
Eliyahu Goldin - 09 May 2006 08:20 GMT
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

>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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.