Databinding with Devexpress

Posts   
 
    
timbered
User
Posts: 48
Joined: 09-Feb-2020
# Posted on: 26-Mar-2020 05:51:15   

This is my third post in as many days. Apologies for being a pest.

I'm asking here because since you use Devexpress libraries in Llblgen, you have more experience with their stuff than they do with yours.

The Dx components are Data Annotation Attribute aware for Entity Framework classes. I want to add a few of these attributes in the Llblgen designer, but I want to use the Llblgen runtime, not EF. Do you know if the Dx grid will see the attributes, even though it's Llblgen generated code, not EF?

If so, can you bind them through the Devexpress Data Source Wizard, or only in code?

Thanks in advance!

T

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Mar-2020 07:29:47   

Hi T,

The recommendation is that you use databinding through a DataSource, and every control should bind to such data source. Both the entity objects and the EntityCollection<T>s are made databinding aware, so there should be no problem with that. If you need to add custom attributes to all entities you can do so adding custom attributes at project level.

Take a look at this to find more information about LLBLGen and Databinding.

I hope that helps.

David Elizondo | LLBLGen Support Team
timbered
User
Posts: 48
Joined: 09-Feb-2020
# Posted on: 26-Mar-2020 19:24:28   

I figured the data binding would be an RTFM question. But it was late last night, and I was zonked.

I tried the binding this morning, and it worked great.

If I have issues with the attributes, I'll let you know.

Thanks!