This question is locked. New answers and comments are not allowed.
Hello,
I'm experiencing a problem with RadGridView for Silverlight.
I have a grid, whose ItemSource is bound to a property of the ViewModel.
This grid is made of some columns, bound to some property of each item in ItemSource, and two additional button columns whose command SHOULD be bound to other properties of the ViewModel, and not to the properties of an item in ItemSource.
Is this scenario supported and how?
Thanks.
Attached is the grid code:
<telerikGridView:RadGridView
Height="250"
VerticalAlignment="Top"
IsFilteringAllowed="False"
ShowGroupPanel="False"
Margin="0,5,0,0"
Grid.Row="1"
Grid.Column="0"
AutoGenerateColumns="False"
ColumnsWidthMode="Auto"
IsReadOnly="True"
MultipleSelect="False"
x:Name="gridExample"
CCRadGridViewCommands:SelectionChanged.Command="{Binding SomeCommand}"
ItemsSource="{Binding Path=PersonList}">
<telerikGridView:RadGridView.Columns>
<telerikGridView:GridViewDataColumn Header="Name" TextAlignment="Left" DataMemberBinding="{Binding PersonName}" />
<telerikGridView:GridViewDataColumn Header="Surname" TextAlignment="Left" DataMemberBinding="{Binding PersonSurname}" />
<telerikGridView:GridViewColumn Header="">
<telerikGridView:GridViewColumn.CellTemplate>
<DataTemplate>
<Button x:Name="btnViewDetails" Content="Details" CCButtonCommands:Click.Command="{Binding ViewDetailsClickCommand}" ></Button>
</DataTemplate>
</telerikGridView:GridViewColumn.CellTemplate>
</telerikGridView:GridViewColumn>
<telerikGridView:GridViewColumn Header="">
<telerikGridView:GridViewColumn.CellTemplate>
<DataTemplate>
<Button x:Name="btnViewData" Content="Data" CCButtonCommands:Click.Command="{Binding ViewDataClickCommand}" ></Button>
</DataTemplate>
</telerikGridView:GridViewColumn.CellTemplate>
</telerikGridView:GridViewColumn>
</telerikGridView:RadGridView.Columns>
</telerikGridView:RadGridView>
I'm experiencing a problem with RadGridView for Silverlight.
I have a grid, whose ItemSource is bound to a property of the ViewModel.
This grid is made of some columns, bound to some property of each item in ItemSource, and two additional button columns whose command SHOULD be bound to other properties of the ViewModel, and not to the properties of an item in ItemSource.
Is this scenario supported and how?
Thanks.
Attached is the grid code:
<telerikGridView:RadGridView
Height="250"
VerticalAlignment="Top"
IsFilteringAllowed="False"
ShowGroupPanel="False"
Margin="0,5,0,0"
Grid.Row="1"
Grid.Column="0"
AutoGenerateColumns="False"
ColumnsWidthMode="Auto"
IsReadOnly="True"
MultipleSelect="False"
x:Name="gridExample"
CCRadGridViewCommands:SelectionChanged.Command="{Binding SomeCommand}"
ItemsSource="{Binding Path=PersonList}">
<telerikGridView:RadGridView.Columns>
<telerikGridView:GridViewDataColumn Header="Name" TextAlignment="Left" DataMemberBinding="{Binding PersonName}" />
<telerikGridView:GridViewDataColumn Header="Surname" TextAlignment="Left" DataMemberBinding="{Binding PersonSurname}" />
<telerikGridView:GridViewColumn Header="">
<telerikGridView:GridViewColumn.CellTemplate>
<DataTemplate>
<Button x:Name="btnViewDetails" Content="Details" CCButtonCommands:Click.Command="{Binding ViewDetailsClickCommand}" ></Button>
</DataTemplate>
</telerikGridView:GridViewColumn.CellTemplate>
</telerikGridView:GridViewColumn>
<telerikGridView:GridViewColumn Header="">
<telerikGridView:GridViewColumn.CellTemplate>
<DataTemplate>
<Button x:Name="btnViewData" Content="Data" CCButtonCommands:Click.Command="{Binding ViewDataClickCommand}" ></Button>
</DataTemplate>
</telerikGridView:GridViewColumn.CellTemplate>
</telerikGridView:GridViewColumn>
</telerikGridView:RadGridView.Columns>
</telerikGridView:RadGridView>