Hidden columns???

Posts   
 
    
lyndon_h
User
Posts: 79
Joined: 14-Sep-2004
# Posted on: 08-Feb-2007 19:47:06   

I'm having a problem with the entityCollection of of an object"hiding" columns when its being databinded. The odd thing, is that the hidden columns are displayed when i "extract" and object from the collection. I've checked the entityFactory class of the object in question, and i dont see anything odd. I can't figure out whats going on.

EntityCollection coll = new EntityCollection(new EN_CUST_BANK_MARKETEntityFactory()); Global.da.FetchEntityCollection(coll, null);

//when i display the grid, the BANK_MARKET_DATE column is not being displayed GridView1.DataSource = coll; GridView1.DataBind();

//the BANK_MARKET_DATE column is displayed EN_CUST_BANK_MARKETEntity o = (EN_CUST_BANK_MARKETEntity)coll[0]; Response.Write(o.BANK_MARKET_DATE.ToString());

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 09-Feb-2007 04:09:50   

Is there anything different about the column? Is it from a related entity? Is it involved in any inheritance hierarchy?

lyndon_h
User
Posts: 79
Joined: 14-Sep-2004
# Posted on: 09-Feb-2007 17:34:35   

bclubb wrote:

Is there anything different about the column? Is it from a related entity? Is it involved in any inheritance hierarchy?

thanks for the response, bClubb. The hidden columns are in the same table. The field in question is a simple DateTime field. Its really odd that the field is hidden in a collection, but its available when i extract a single entity from that collection. confused

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 10-Feb-2007 11:14:40   

Though do you use inheritance? If the field is in a subtype, it doesn't show up in databinding, unless the type of entity in the collection (factory) is of that subtype.

Frans Bouma | Lead developer LLBLGen Pro
lyndon_h
User
Posts: 79
Joined: 14-Sep-2004
# Posted on: 12-Feb-2007 23:41:06   

Otis wrote:

Though do you use inheritance? If the field is in a subtype, it doesn't show up in databinding, unless the type of entity in the collection (factory) is of that subtype.

the odd thing is that i'm not using inheritance. The fields that i'm calling are simple columns, with nothing tricky going on. disappointed

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Feb-2007 08:16:13   

Which LLBLGen Pro runtimeLibrary version are you using?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 13-Feb-2007 10:01:27   

As you're using asp.net, also check if the HTML contains the column. If hte column isn't specified in the HTML, it might be the gridview doesn't auto-discover the columns again, because it might be switched off in the page.

Frans Bouma | Lead developer LLBLGen Pro
Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Feb-2007 10:25:27   

As Otis said, most probably it's because of the html code.

As when you bind a collection or any datasource to a gridView at Design time and you specify to auto generate the columns, then you modify your entityCollection or datasource to include an extra column or more, these won't be re-generated in the HTML code, unless you re-do the databinding at design time, or you manually plug the extra column in the html code of the gridView.

lyndon_h
User
Posts: 79
Joined: 14-Sep-2004
# Posted on: 13-Feb-2007 15:11:19   

Otis wrote:

As you're using asp.net, also check if the HTML contains the column. If hte column isn't specified in the HTML, it might be the gridview doesn't auto-discover the columns again, because it might be switched off in the page.

You were right. I manually called the columns in the Gridview and it worked. The odd thing is that i'm not using design time binding. Furthermore, i have only not edited the table and regenerated the code, so i'm not sure why only some of the columns are binding.

I'm going to do a search and see if i can come up with.