Solved

datagridview change border for one row

Posted on 2010-11-23
6
843 Views
Last Modified: 2012-05-10
Hi there,
I want to implement the following.

When the user clicks anywhere on a row, i want the borders of the row (OR all top and bottom cell borders and the left border of the first cell and the right border of the last cell) to become red.

Is that possible? Can i have some suggested code please?
Thanks
0
Comment
Question by:ioustinos_sarris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 250 total points
ID: 34203705
0
 

Author Comment

by:ioustinos_sarris
ID: 34207261
I need to change the borders and not the back color.
thanks anyway
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34207300
That was supposed to be an example.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 250 total points
ID: 34209653
In order to draw borders in a cell, you can handle the CellPainting event, and draw your own lines, when the cell's RowIndex is the currently selected row.
0
 
LVL 22

Expert Comment

by:Mrunal
ID: 34288550
It will be very easy if you use jQuery.
After datagridview declaration,
write function as-
bind click function to each tr of datagridview table (rendered).
than use addClass("classname");

and declare class name in css file.
write in css definition as:
border:3px;

ref:
http://api.jquery.com/bind/
http://api.jquery.com/addClass/

hope you will get what i mean.
0
 

Author Closing Comment

by:ioustinos_sarris
ID: 34408405
not really what i wanted
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question