Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 850
  • Last Modified:

datagridview change border for one row

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
ioustinos_sarris
Asked:
ioustinos_sarris
2 Solutions
 
CodeCruiserCommented:
0
 
ioustinos_sarrisAuthor Commented:
I need to change the borders and not the back color.
thanks anyway
0
 
CodeCruiserCommented:
That was supposed to be an example.
0
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!

 
Bob LearnedCommented:
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
 
MrunalCommented:
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
 
ioustinos_sarrisAuthor Commented:
not really what i wanted
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now