BBS does not show Custom Field (CFP)


Author
Message
Luiz Lima
Luiz Lima
StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)
Group: Forum Members
Posts: 66, Visits: 724
Hi,



I created some CFPs but they don´t appears on my selection field when I use a BBS with DevExpress Grid.



Anybody can help me?



Tks

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Most likely you did not add them to the GetCustomBindablePropertyDescriptors. You need to override this method and add the ReflectionPropertyDescriptors for each CFP.



You can see samples of this in a lost of different SF samples. The best, however, would be the StrataFlix sample.
Luiz Lima
Luiz Lima
StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)
Group: Forum Members
Posts: 66, Visits: 724
Trent,



I don´t have strataflix here, I tried to find this property on VB Samples, but I didn´t.Sad

Can you help me with the example below?

If this CFP appears on Grid, We will solve a huge problem on my development.



Tks a lot again,



Luiz

--------------------------------------------------------------------------------------------------------

_

Public ReadOnly Property [CFP_pro_descr]()

Get

Dim loCommand As New SqlCommand()

loCommand.CommandText = "SELECT pro_descr FROM tb_produto WHERE pro_cod = @pro_cod"

loCommand.Parameters.Add("@pro_cod", SqlDbType.VarChar)

loCommand.Parameters("@pro_cod").Value = Me.pro_cod

Return CType(Me.ExecuteScalar(loCommand), String)

End Get

End Property

--------------------------------------------------------------------------------------------------------

Luiz Lima
Luiz Lima
StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)
Group: Forum Members
Posts: 66, Visits: 724
Ops...the code was cutted.





_

Public ReadOnly Property [CFP_pro_descr]()

Get

Dim loCommand As New SqlCommand()

loCommand.CommandText = "SELECT pro_descr FROM tb_produto WHERE pro_cod = @pro_cod"

loCommand.Parameters.Add("@pro_cod", SqlDbType.VarChar)

loCommand.Parameters("@pro_cod").Value = Me.pro_cod

Return CType(Me.ExecuteScalar(loCommand), String)

End Get

End Property



Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Luiz,



Here is a sample in VB, make sure you use your BO name in the GetType():





Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()

Return New MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _

New ReflectionPropertyDescriptor("cfp_pro_descr", GetType(Here use the name of your bo))}

End Function



Edhy Rijo

Luiz Lima
Luiz Lima
StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)
Group: Forum Members
Posts: 66, Visits: 724
Edhy,



In which point of file should I put this lines to garantee that BOM will not kill my codes?



tks
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Luiz,



Put it anywhere in your BO it is just another function. Make sure you re-build your BO project or the whole solution to make sure it will be seen by the BBS.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Edhy is putting you on the right track here...but you can download StrataFlix by just logging into the My Account area of the SF website and going to the downloads section.
Luiz Lima
Luiz Lima
StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)
Group: Forum Members
Posts: 66, Visits: 724
Edhy,



It didn´t work!

I made a clean / rebuild and nothing!

Could you see my BO code to see if I´m doing something wrong?



I attached a file with:



- ScreenShot of Devexpress grid configuration

- My BO



Tks
Attachments
CFP_problem.rar (113 views, 20.00 KB)
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Luiz,



Could it be because you have the name of the property enclosed with brackets [] in the GetCustomBindablePropertyDescriptors?



Just copy the one I did for you above, it should work. Rebuild the solution before testing.



If that does not work, close the solution and VS then open it again, build and try.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search