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
190
Binding to XML attribute in XamDatagrid.
posted

Hi,

I'm using XamDataGrid and DataSource is XmlDataProvider. My XML is looks like this,

<root>

<Rows>

<Row>

<Day1 IsValidDay="True" IsHoliDay="True"></Day1>

<Day2 IsValidDay="False" IsHoliDay="False"></Day2>

<Day3 IsValidDay="True" IsHoliDay="True"></Day3>

.

.

.

<Day30 IsValidDay="True" IsHoliDay="True"></Day30>

</Row>

</Rows>

</root>

I need to show the cell background color in different color when IsValidDay="False" and IsHoliDay="True". How to define the DataTrigger for this? I dont know how to bind the data for DataTrigger. I tried to do something like this,

<Binding Path="DataItem.Childnode[0].Attributes[0].Value" Value="True"/>

However it is doing binding for first Cell. Not for all. So I need to repeat this for 30 thimes. So I'm wondering is there any way i can get the current cell and bind it to all in single statement. any pointer at the right direction will be grealty appriciated.

-Ashwath