Partial
Partial

Reputation: 10009

C# WPF datagrid: ItemsSource

I want to know how you can modify properties of columns of a WPF toolkit datagrid once the ItemsSource has been set (it is set in XAML)? For example I want to make a specific column have the property IsReadOnly equal to true.

So basically there are two things I want to know:

-How can I get access to a specific column once the ItemsSource has been set?

-How can I change the properties of a specific column once the ItemsSource has been set?

Upvotes: 1

Views: 2829

Answers (1)

Henrik P. Hessel
Henrik P. Hessel

Reputation: 36637

Answer to both questions is:

  • By looping through your datagrid
  • Access column by it's index

Upvotes: 1

Related Questions