Grid Refresh -Binding Error


Author
Message
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
I have list of services (Object) in my grid. I've added a record (Services Object) on different page. Then, refresh the grid when I came to Grid page. I have got the error below.

An error occurred while refreshing the data from field 'Services.unitset_id' to property 'SelectedValue' on control 'editUnitSet.'

When I open the page from menu. I have seen the added record.

Replies
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
The error was related the parameters given in Listpopulating Event. Null control  was missing. Now, when BusinessObject has no records, I'm not getting the error specified. I 've continued working on the form ;

I 've requeried the object (which is bound to the grid and UI controls which show current object) with parameters that returns records . Object had records after query. I've got the new error. (See details)

Type : System.InvalidCastException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Specified cast is not valid.
Source : Medin.Business.Materials.New
HelpLink :
TargetSite : Void SetValue(System.Object, System.Object)
StackTrace :
 Medin.Business.Materials.Purchase.Services.Field_unitset_id_Descriptor.SetValue(Object component, Object Value)
  C:\Documents and Settings\ertan.deniz.KULLANICI\My Documents\Visual Studio 2005\Projects\Medin.Materials\Medin.Materials.Purchase.Business\Purchase\Objects\Services.Designer.cs:line 1235
 System.Windows.Forms.BindToObject.SetValue(Object value)
 System.Windows.Forms.Binding.PullData(Boolean reformat, Boolean force)
 System.Windows.Forms.Binding.UpdateIsBinding()
 System.Windows.Forms.Binding.CheckBinding()
 System.Windows.Forms.Binding.SetListManager(BindingManagerBase bindingManagerBase)
 System.Windows.Forms.ListManagerBindingsCollection.AddCore(Binding dataBinding)
 System.Windows.Forms.BindingsCollection.Add(Binding binding)
 System.Windows.Forms.BindingContext.UpdateBinding(BindingContext newBindingContext, Binding binding)
 System.Windows.Forms.Binding.SetBindableComponent(IBindableComponent value)
 System.Windows.Forms.ControlBindingsCollection.AddCore(Binding dataBinding)
 System.Windows.Forms.ControlBindingsCollection.Add(Binding binding)
 MicroFour.StrataFrame.Business.BusinessLayer.AddBinding(Control ControlToRefresh, String PropertyName, String FieldName)
 MicroFour.StrataFrame.Business.BusinessLayer.RefreshControl(IBusinessBindable ControlToRefresh, Boolean DataPresent)

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Well, there seems to be quite a bit going on, but the last error seems to be the easiest to dianose.  It is a cast exception so that value that is being passing into the Set of the unitset_id field is not a type that can be converted into the type it is expecting.  For example, this may be a integer field and character data is being passed into the Set of the property.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ertan Deniz - 17 Years Ago
Ertan Deniz - 17 Years Ago
Ertan Deniz - 17 Years Ago
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ertan Deniz - 17 Years Ago
Ertan Deniz - 17 Years Ago
     Any Comment ?
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ertan Deniz - 17 Years Ago
             OK...that makes more sense.
Trent L. Taylor - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search