This is a migrated thread and some comments may be shown as answers.

Problem RadGridView + DomainDataSource. NET Ria Service, Empty Collection, the first insertion

1 Answer 96 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
thiago_zueranet
Top achievements
Rank 1
thiago_zueranet asked on 06 Aug 2009, 02:07 PM
I'm using RadGridView with DomainDataSource.

 

 

<riaControls:DomainDataSource x:Name="dds" LoadSize="40" PageSize="20" QueryName="GetPaisQuery">

 

 

 

    <riaControls:DomainDataSource.DomainContext>

 

 

 

        <ClientServ:SmartBusinessDomainContext/>

 

 

 

    </riaControls:DomainDataSource.DomainContext>

 

 

 

</riaControls:DomainDataSource>

 

 

 

 

 

 

 

<telerikGridView:RadGridView x:Name="grid" Grid.Row="1" AutoGenerateColumns="True" ItemsSource="{Binding Data, ElementName=dds}" AddingNewDataItem="grid_AddingNewDataItem"></telerikGridView:RadGridView>

 

 

 

A collection of entities of DomainDataSource is initially empty, since no record in the database! Until then fine!

The problem happens when I add a new record triggering RadGridView.BeginInsert ()

In the event AddingNewDataItem I'm doing the following:
object newEntity = (this._DataSource.Data as System.ComponentModel.IEditableCollectionView).AddNew();

 

 

 

e.NewObject = newEntity

;

 


The new line is inserted in RadGridView, but she is in a way that I can not write into the cell.

The interesting thing is that I do the same procedure, but instead of a collection of empty and contains DomainDataSource start a registry, it lets me insert a new record quietly.

What may be happening?

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 12 Aug 2009, 08:40 AM
Hi thiago_zueranet,

Please check this forum thread for an answer.

Best wishes,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
thiago_zueranet
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or