I have a GridView in a WPF page. I've got the "Click here to add new item" row to appear in the grid, but when I click anywhere in the row, nothing happens. I cannot get the new row to appear. I've got "ShowInsertRow" and "CanUserInsertRow" both set to True. Am I missing something? Is there something else I have to do to make the new line appear?
Here's my XAML for the control, Thanks for your help.:
<telerik:RadGridView Name="rgvParameters" Grid.Column="1" HorizontalAlignment="Left" Margin="134,476,0,0" VerticalAlignment="Top" Height="171" Width="496" ItemsSource="{Binding}" IsFilteringAllowed="False" ShowGroupPanel="False" AutoGenerateColumns="False" SelectionUnit="Cell" ShowInsertRow="True" ActionOnLostFocus="None" CanUserInsertRows="True" CanUserReorderColumns="False" CanUserSortGroups="False" CanUserDeleteRows="False" SelectionChanged="rgvParameters_SelectionChanged">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Name="rgcParameterID" DataMemberBinding="{Binding [ParameterID]}" Width="0" MaxWidth="0" MinWidth="0" />
<telerik:GridViewDataColumn Name="rgcApplicationID" DataMemberBinding="{Binding [ApplicationID]}" Width="0" MaxWidth="0" MinWidth="0" />
<telerik:GridViewDataColumn Name="rgcParameterName" DataMemberBinding="{Binding [ParameterName]}"
Header="Key" />
<telerik:GridViewDataColumn Name="rgcParameterValue" DataMemberBinding="{Binding [ParameterValue]}"
Header="Value" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Edit: One thing I just noticed. If I bring up the page and immediately click the new row, the new row line does appear. If I populate the grid with current data from the database with this line of code, the insert new row command no longer works:
rgvParameters.ItemsSource = businessRules.GetParameters(dsApp.Tables[0].Rows[0]["ApplicationID"].ToString());
Why does setting the ItemSource value invalidate the user's abiity to add a new record to the grid?
Here's my XAML for the control, Thanks for your help.:
<telerik:RadGridView Name="rgvParameters" Grid.Column="1" HorizontalAlignment="Left" Margin="134,476,0,0" VerticalAlignment="Top" Height="171" Width="496" ItemsSource="{Binding}" IsFilteringAllowed="False" ShowGroupPanel="False" AutoGenerateColumns="False" SelectionUnit="Cell" ShowInsertRow="True" ActionOnLostFocus="None" CanUserInsertRows="True" CanUserReorderColumns="False" CanUserSortGroups="False" CanUserDeleteRows="False" SelectionChanged="rgvParameters_SelectionChanged">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Name="rgcParameterID" DataMemberBinding="{Binding [ParameterID]}" Width="0" MaxWidth="0" MinWidth="0" />
<telerik:GridViewDataColumn Name="rgcApplicationID" DataMemberBinding="{Binding [ApplicationID]}" Width="0" MaxWidth="0" MinWidth="0" />
<telerik:GridViewDataColumn Name="rgcParameterName" DataMemberBinding="{Binding [ParameterName]}"
Header="Key" />
<telerik:GridViewDataColumn Name="rgcParameterValue" DataMemberBinding="{Binding [ParameterValue]}"
Header="Value" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Edit: One thing I just noticed. If I bring up the page and immediately click the new row, the new row line does appear. If I populate the grid with current data from the database with this line of code, the insert new row command no longer works:
rgvParameters.ItemsSource = businessRules.GetParameters(dsApp.Tables[0].Rows[0]["ApplicationID"].ToString());
Why does setting the ItemSource value invalidate the user's abiity to add a new record to the grid?