StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Custom Fields
Custom Fields
Post Reply
Like
0
Custom Fields
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Ian Hammond
Ian Hammond
posted 14 Years Ago
ANSWER
HOT
Topic Details
Share Topic
Group: Forum Members
Posts: 57,
Visits: 277
Hi,
I am trying to populate a grid from 2 BO's by creating custom fields in the 'master' BO. My code for the custom field properties is :
#region
" Custom Field Properties"
private
const
String
constComputerName =
"computerName"
;
private
const
String
constLoggedIn =
"loggedIn"
;
[
Browsable
(
false
)]
[
BusinessFieldDisplayInEditor
()]
[
Description
(
"computerName"
)]
[
DesignerSerializationVisibility
(
DesignerSerializationVisibility
.Hidden)]
public
String
computerName
{
get
{
return
this
.CurrentRow[constComputerName].ToString(); }
set
{
this
.CurrentRow[constComputerName]=
value
; }
}
[
Browsable
(
false
)]
[
BusinessFieldDisplayInEditor
()]
[
Description
(
"loggedIn"
)]
[
DesignerSerializationVisibility
(
DesignerSerializationVisibility
.Hidden)]
public
Boolean
loggedIn
{
get
{
return
(
Boolean
)
this
.CurrentRow[constLoggedIn]; }
set
{
this
.CurrentRow[constLoggedIn] =
value
; }
}
#endregion
My form has the following event enabled:
private
void
hlsUserNamesBO1_ParentFormLoading()
{
this
.hlsUserNamesBO1.FillUserNames();
this
.hlsUserProfilesBO1.FillAllProfiles();
foreach
(
HLSUserNamesBO
row
in
this
.hlsUserNamesBO1.GetEnumerable())
{
this
.hlsUserProfilesBO1.Filter=
"userId = "
+ row.userId;
this
.hlsUserNamesBO1.computerName =
this
.hlsUserProfilesBO1.computerName;
this
.hlsUserNamesBO1.loggedIn =
this
.hlsUserProfilesBO1.loggedIn;
}
}
When I hit the assignment to computerName I get the exception
"Column 'computerName' does not belong to table HLSUserNames."
Can anyone please advise, many thanks
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Custom Fields
Ian Hammond
-
14 Years Ago
The problem is that the user BO doesn't have the columns defined. You...
Greg McGuffey
-
14 Years Ago
Many thanks for that snippet, problem solved.
Ian Hammond
-
14 Years Ago
Excellent! Glad that helped.
Greg McGuffey
-
14 Years Ago
Having sorted the problem with the data binding to custom fields I...
Ian Hammond
-
14 Years Ago
Hi Ian, Not that my suggestion will resolve the problem with the...
Edhy Rijo
-
14 Years Ago
Ian, First I would reinforce Edhy's suggestion that unless you need...
Greg McGuffey
-
14 Years Ago
Thanks for the suggestion, I have decided to try the ListView route. I...
Ian Hammond
-
14 Years Ago
Hi Iam, The listview has a property named...
Edhy Rijo
-
14 Years Ago
Hi, That info made quite a difference, thanks. I am still having...
Ian Hammond
-
14 Years Ago
Very good Ian. You don't need to do anything in the RowPopulating...
Edhy Rijo
-
14 Years Ago
This issue is now resolved, I have since discovered the...
Ian Hammond
-
14 Years Ago
Congratulations!
Edhy Rijo
-
14 Years Ago
I'm glad you got it working Ian and thanks for all the help Edhy (the...
Greg McGuffey
-
14 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search