This question is locked. New answers and comments are not allowed.
Hello,
I have a GridView that is bound to my seriesViewModel (which come from a web serivice call). And I have a button to insert a row in the grid, however, it doesn't work:
What am I missing?
I have a GridView that is bound to my seriesViewModel (which come from a web serivice call). And I have a button to insert a row in the grid, however, it doesn't work:
What am I missing?
<
telerik:RadGridView
Name
=
"dgSeries"
Grid.Row
=
"1"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"False"
ItemsSource
=
"{Binding AllSeries}"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Button
x:Name
=
"btnSave"
Height
=
"20"
Width
=
"100"
Command
=
"{Binding SaveCommand}"
>
<
TextBlock
><
Run
Text
=
"Update"
/></
TextBlock
>
</
Button
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Button
x:Name
=
"btnDelete"
Height
=
"20"
Width
=
"100"
Command
=
"{Binding DeleteCommand}"
>
<
TextBlock
><
Run
Text
=
"Delete"
/></
TextBlock
>
</
Button
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"ID"
DataMemberBinding
=
"{Binding ID}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Name"
DataMemberBinding
=
"{Binding Name}"
IsReadOnly
=
"False"
/>
<
telerik:GridViewDataColumn
Header
=
"NavPerShare"
DataMemberBinding
=
"{Binding NavPerShare}"
IsReadOnly
=
"False"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
<
telerik:RadButton
Width
=
"80"
Content
=
"New"
Margin
=
"0,0,5,0"
HorizontalAlignment
=
"Left"
Command
=
"telerik:RadGridViewCommands.BeginInsert"
CommandTarget
=
"{Binding ElementName=dgSeries}"
/>