Is there a way to change the column headers of a SL2 datagrid during databinding? I’m looking for something similar to ASP.net’s rowDataBound, I’m looking at _LoadingRow is this the correct event?
Share
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.
As suggested by rAyt in their answer, you can add bindings to the columns. With an appropriate binding and possibly a value converter, you could use this mechanism to update the headers.
You can also set the
DataGridto auto-generate columns based on the collection data. You may find this a better route. You can also modify the auto-generated columns as described by this MSDN article.