How to get the Column index or Column.DisplayIndex from its Column Header in WPF DataGrid?
I know the Column Header, want to get column index.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you could use
DisplayIndex(be aware this will change if columns are resorted)edited: thanks for suggestion from @AnHX