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
I think there is conflict or complication. What do you say the conflict with the message and code ?

The line from my code shows that unitset_id gets value.

((Services)component).unitset_id = (Nullable<System.Int32>Value; (Error : Specified Cast is not valid.)

But message says  control gets value ;

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

 



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
Ertan,

I don't see anything past an invalid cast exception.  Why can't you just return an alternate value on Null so that a valid value is returned to the grid?  I do not believe this to be a BBS or BO "bug" or "issue" but rather how it is designed.  If the control to which you are binding doesn't support a null value being returned, then you would want to ensure that it can be cast by supplying a valid value.  Just from looking at your code snippet and stack trace, this is what I would recommend.

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