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