Hello guys ,
My problem is when I add a record via RadGrid (property ShowInsertRow="True") then the result on RadGrid show 2 rows with same data.
Eg.
1. click add new record and fill in some data. > http://img814.imageshack.us/i/85624215.png/
2. after I press ENTER button and click on column header (sorting) I got this result. > http://img708.imageshack.us/i/96015502.png/
3. repeat step 1 and 2. I got this result > http://img214.imageshack.us/i/71641655.png/
XAML :
C#
 
My RadDataPager.Source is List<CodeObj>.
Please give me some advice.
Thank you
SweNz
                                My problem is when I add a record via RadGrid (property ShowInsertRow="True") then the result on RadGrid show 2 rows with same data.
Eg.
1. click add new record and fill in some data. > http://img814.imageshack.us/i/85624215.png/
2. after I press ENTER button and click on column header (sorting) I got this result. > http://img708.imageshack.us/i/96015502.png/
3. repeat step 1 and 2. I got this result > http://img214.imageshack.us/i/71641655.png/
XAML :
<telerik:RadGridView x:Name="CodeRadGrid" IsReadOnly="False" AutoGenerateColumns="False" SelectionMode="Extended" telerik:StyleManager.Theme="Office_Blue"ItemsSource="{Binding PagedSource, ElementName=ctlDataPager}" ShowInsertRow="True" AddingNewDataItem="CodeRadGrid_AddingNewDataItem"RowEditEnded="CodeRadGrid_RowEditEnded" ><telerik:RadGridView.Columns>   <telerik:GridViewSelectColumn />       <telerik:GridViewDataColumn DataMemberBinding="{Binding aCode}" Header="A Code"/>        <telerik:GridViewDataColumn DataMemberBinding="{Binding bCode}" Header="B Code">    </telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView> <telerik:RadDataPager x:Name="RadDataPager" PageSize="7" DisplayMode="First, Last, Next, Previous, Text" IsTotalItemCountFixed="True" />C#
private void CodeRadGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e){    e.NewObject = new CodeObj();}private void CodeRadGrid_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e){    if (e.EditAction == GridViewEditAction.Cancel)    {        return;    }    if (e.EditOperationType == GridViewEditOperationType.Insert)    {        ((List<CodeObj>)this.RadDataPager.Source).Add( (CodeObj) e.NewData);    }}My RadDataPager.Source is List<CodeObj>.
Please give me some advice.
Thank you
SweNz