Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top