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.

Reply
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've attached the code clock below. I'm trying to fill the object. (FillDataTable) At this time,
SetValue is running and I'm gettinng the error. (It is signed with red on the code block.)
It is interesting that left side of the assignment has a value (valid unitsetid) but right side has null value.
So, casting error. The object has values coming from DB. But there is an assignment (SetValue) which is trying
to assign values on the object which is filled. Normally, After object has values coming from DB, binding mechanism will start.
Why does SetValue run at this time ? What is the meaning of SetValue ?

Is the order of assignment true ? I expect that right side must be left side ? Because, I'm displaying values from DB.

Do you explain the process briefly ? Fill, Bind etc.

private class Field_unitset_id_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
        {
            public Field_unitset_id_Descriptor() : base("unitset_id") { }
            private System.Type _PropertyType = typeof(System.Int32);
            public override object GetValue(Object component)
            {
                return ((Services)component).unitset_id;
            }
            public override void SetValue(Object component, object Value)
            {
                ((Services)component).unitset_id = (Nullable<System.Int32>WinkValue; (Error : Specified Cast is not valid.)
            }
            public override System.Type PropertyType
            {
                get
                {
                    return this._PropertyType;
                }
            }
            public override System.Type ComponentType
            {
                get
                {
                    return _ComponentType;
                }
            }
        }

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