Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
How to bind Header text with Itemsource
posted

Hello All,

I am trying to achieve following:

 <igGrid:TextColumn Key="B"  
HeaderText="{Binding Z}" 
CellStyle="{StaticResource SecondColumn}"
TextBlockStyle="{StaticResource CellBlock}"
HeaderStyle="{StaticResource HeaderStyleCol1}"  />

Is it possible to bind a field from ItemoSource to Header text of column..? 
Right now I have binded an element to header text but it is not working (showing key as header). :(

How can I achieve this at design time..? 

Thanks in advance. 

  • 8421
    posted

    Hello,

    Could you provide a little more detail about why you want to bind to a field in the ItemSource? In general, each item in the ItemSource would have its own value for Z and it would be difficult to determine the correct one to apply.

    A better approach would be to create a property in your ViewModel and bind to that property.