DataForm and QDSCV

3 posts, 0 answers
  1. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 06 Apr 2011 Link to this post

    Hi,
    today I tried QDSCV :)

    My XAML:
    <telerik:RadDataForm
     ItemsSource="{Binding View}"
     EditEnded="RadDataForm_EditEnded"
     DeletedItem="RadDataForm_DeletedItem"
    />

    Property in CodeBehind for QDSCV:
    private QueryableDomainServiceCollectionView<DayRecord> view;
    public QueryableDomainServiceCollectionView<DayRecord> View
    {
    get { return view; }
    set { view = value; FirePropertyChanged("View"); }
    }

    Constructor of CodeBehind:
    DiaryDomainContext ctx = new DiaryDomainContext();
    EntityQuery<DayRecord> q = ctx.GetDayRecordQuery();
    View = new QueryableDomainServiceCollectionView<DayRecord>(ctx, q);
    // -----------------------------------------------------------
    View.PageSize = 50;
    View.AutoLoad = true;
    // ----------------------------------------------------
    InitializeComponent();
    this.DataContext = this;

    Events EditEnded() and DeletedItem() only call View.SubmitChanges().

    When this is run with no data in table, then no fields are (auto)generated and there is no chance to add new (first) record. This is problem number 1.

    I added manually record to table thru SQL:
    INSERT INTO DayRecord (DayUser, DayDate, DayContent) values ("Me","2011/04/06","Telerik QDSCV test");

    .. and run it again.
    Fields are now (auto)generated and my record is displayed.

    So I can add new record (note that is submitted in EditEnded event). Record is added but in RadDataForm is available only one item (last added or first - based on what "arrow" is clicked to move in collection). . This is problem number 2 - now must be in collection two records, original from SQL and added (?).

    So I run it again and now both records are available.

    Last note - this is simpified example. I found this problem with RadGridView and RadDataForm connected to one QDSCV. When GridView is filtered to none records (empty set) then DataForm is not able add new records.
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 11 Apr 2011 Link to this post

    Hi Leos,

    I have made some tests here , and bellow are my findings.

    When the source QDSCV is filtered, and you click the add button , actually the item is added. However it does not pass the current filter set. QDSCV can not have an item as current , when it does not pass the filters. DataForm displays the current item , and when it is null , it will show no UI.

    In less words - if the newly added item does not pass the filter  it is expected to have no item on the screen.

    Regards,
    Pavel Pavlov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 11 Apr 2011 Link to this post

    Hi Pavel,

    I can try it later with QDSCV but similar problem is with RDDS so I can test it immediately.

    See URL described in other topic:
    http://qds.aspone.cz/DiaryExample/DiaryExampleTestPage.aspx

    I added in RGV fiter to "Subject Starting with Q".
    No data selected, no data displayed.

    I clicked Add in RDF.
    See that no 0 (zero) is filled/displayed in ID (integer field) after adding. 
    But OK, we will continue.
    Some date, into Subject and Test I added "Question?"
    I clicked OK (in event must be fired SubmitChanges()).

    My record goes empty (??) and no record added to grid.
    I restarted application - no "Question?" is present.

    Sources are described in PDF but what is important:
    one RDDS and both RGV and RDF ItemSources are bind to DataView of RDDS.

    Leos
Back to Top