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

Empty dataset and new row problem

7 Answers 71 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Leos
Top achievements
Rank 1
Leos asked on 09 Apr 2011, 09:28 PM
Hello,
I have RadDomainDataSource.
I have readonly RadGridView with ItemsSource binded to DataView of RadDomainDataSource.
I have RadDataForm with ItemsSource binded to DataView of RadDomainDataSource.

When I set filter on RadGridView to condition where no records are returned, then I cannot insert new row with RadDataForm.

This has probably similar or the same reason as bug described with QDSCV:
http://www.telerik.com/community/forums/silverlight/data-form/dataform-and-qdscv.aspx

L.

7 Answers, 1 is accepted

Sort by
0
Leos
Top achievements
Rank 1
answered on 10 Apr 2011, 05:52 PM
Note, that this will not occured when table is empty. Only in relation to RGV filtering (with RDDS).
Leos
0
Pavel Pavlov
Telerik team
answered on 11 Apr 2011, 04:04 PM
Hello Leos,

Indeed there is such issue  - RadDataForm respects the currency and if the source collection is aware of the current item , RadDataForm will stick to it.
When you add new item , most probably it will not pass the currently applied filters.  So the current item of the source collection would be null , therefore RadDataForm will show empty UI.

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
0
Leos
Top achievements
Rank 1
answered on 11 Apr 2011, 04:46 PM
Hi Pavel,
thank you.
But I need to know, what next?
If this is final status (or final for near future / month/ ) then I need omit RadDataForm  from my tests and look for other solution, probably "manual" forms with full control.
Leos
0
Accepted
Pavel Pavlov
Telerik team
answered on 12 Apr 2011, 12:37 PM
Hi Leos,

I may offer the following workaround - turn off filtering while adding new item .
Is that applicable for your scenario ?

All the best,
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
0
Leos
Top achievements
Rank 1
answered on 12 Apr 2011, 01:10 PM
Yes.
It is working.

private void rdf_AddingNewItem(object sender, AddingNewItemEventArgs e)
{
  if (rgv.FilterDescriptors.Count > 0)
  {               
    rgv.FilterDescriptors.Clear();
    //MessageBox.Show("Filter cleared");
  }
}

And big thanks!
0
Andreas Decke
Top achievements
Rank 1
answered on 19 Apr 2011, 01:58 PM
Hello,

i use internal Build (411) the Problem is the same(see image).
RadGridView is empty then click on Add in RadDataForm,
RadGridView insert an item ,the UI of RadDataForm is empty.

After click on Add, the OK- Button enabled, when cklick OK
is the Exeception:

System.ComponentModel.DataAnnotations.ValidationContext on
SDLManager.Controls.EditMonitors.DataFormMonitor_EditEnded(Object sender, EditEndedEventArgs e)


Sorry, the image...

0
Leos
Top achievements
Rank 1
answered on 19 Apr 2011, 03:02 PM
You sent no image :)

Look at following example it is working for me.
But this is not developed with internal build, so maybe problem is here? Try it.
http://www.telerik.com/community/forums/silverlight/data-form/easy-application-with-raddataform.aspx

Leos
Tags
DataForm
Asked by
Leos
Top achievements
Rank 1
Answers by
Leos
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Andreas Decke
Top achievements
Rank 1
Share this question
or