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 / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

Selecting entire row in DataGrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bachus - 15 Apr 2005 18:22 GMT
Hello,
Is there any way to disable highlight on selected cell in DataGrid ?
I want to select entire rows and only rows in my DataGrid.
DataGrid is readonly.
I put that into my code :

private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs
e)
{
  dataGrid1.Select(dataGrid1.CurrentCell.RowNumber);
}

This selects entire row, but current cell is highlited. i want to get rid of
that highlight.
What should i do ? Is it possible to do that by changing some properties ?

Adam
kaborka - 15 Apr 2005 21:26 GMT
When I select the row from the MouseUp handler, I don't have a highlight on
the cell:

private void dgrMain_MouseUp(object sender,
                                             
System.Windows.Forms.MouseEventArgs e)
{
   DataGrid.HitTestInfo hit = dgrMain.HitTest(e.X, e.Y);
   if (hit.Type == DataGrid.HitTestType.Cell) dgrMain.Select(hit.Row);
}

> Hello,
> Is there any way to disable highlight on selected cell in DataGrid ?
[quoted text clipped - 13 lines]
>
> Adam

Rate this thread:







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.