Enable button when checkbox-templated rows of a grid's column are checked

1) I have a WPF grid (I'm using telerik's but this is not the point)

            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding }" Header="Choice">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding USER_CHECKBOX}"  ></CheckBox>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>

                <telerik:GridViewDataColumn DataMemberBinding="{Binding TYPE}" Header="TYPE"  />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding VENUE}" Header="VENUE"  />

2)The elements of first column of the grid are templated as a checkbox because i want the user to check up to checkboxes(equivalent to selecting new rows)

3)I want the user to choose up to two columns, and i also need to make sure that a field(TYPE) between the two columns is different.

4) When the right columns are checked, i wish to enable a button that allows user to continue

Using Calirburn Micro what is the best approach to achieve that? Should i use a behaviour?

Thx in advance

EDIT

Before giving me -1 please you should be aware that the question page in stackoverflow states that "We prefer questions that can be answered, not just discussed." but it's not forbidden to ask for best approaches as i did. I thank who's answering.

Answers


All the logic should be in your viewmodel. For instance you should bind the 'Enabled' property to your viewmodel and then set that depending on whether your logic has been met.


Need Your Help

show pixel value of .TIF image on the basis of X Y coordinates in c#

c#

i am in trouble. how to read 1MB .tif file with bitmap class in c# and have to show pixel value of this .tif image on the basis of X Y coordinates. I searched google lot but not find any answer yet.