?
Solved

Need help for retrieving row index of System.Windows. Control.DataGrid placed in WPF usercontrol when we mouse hover it.

Posted on 2014-09-24
2
Medium Priority
?
170 Views
Last Modified: 2014-10-09
Hello Everyone.

Basically I am converting an Window form application in C# to WPF.
The designed has taken a usercontrol and then add datagrid.
Now in this datagrid,I have three columns.SNo,A uniqueNumber and a remove button.
(1)First,I wanted to know how to delete the column on press of that remove button as I am not able to retrieve the rowindex.
(2)on mouse hover,I wanted to change the color of data grid.Color is changing using XML style but not able to change the color of button in the third column.

Please help.I found so many ans as selected index,using visualtreehelper class,but not able to retrieve the data.mostly in every case I am getting NULL as result.
Hence I will appreciate id directly someone can put the exact code.
I have described the complete scenario.If you require more detail  to answer,please let me know.
0
Comment
Question by:BYTECHINDIA
[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
2 Comments
 
LVL 25

Accepted Solution

by:
apeter earned 1500 total points
ID: 40342696
You have to handle on selection changed and delete button event. This link should help you. http://www.dotnetcurry.com/showarticle.aspx?ID=563
0
 

Author Comment

by:BYTECHINDIA
ID: 40343230
Yes Sir,Actually I was trying to retrieve the item index in mouse hover event where we dont select the cell.As on mouse hover i was changing the color of grid row via XAML but in that case ,color of button was not getting changed.This concept,I am unable to find out but then I took button as an image where color is changing and on click event retrieving the rowindex too to delete.
0

Featured Post

Industry Leaders: 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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

765 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