data binding inherited properties

C

Chris Perry

Hello all,

My problem is simply that I need to be able to show inherited members in my
datagrid but only the members defined in that type are showing up.

Heres my problem :

//dg = my datagrid
dg.DataSource =
((Respondant)e.Item.DataItem)[15].Jobs.ToArray(typeof(JobType)); // Jobs is
an ArrayList
Response.Write(dg.DataSource); // Showing as JobTypeExtra the inherited type
dg.AutoGenerateColumns = true; // only 'Benefits' the non inherited property
shows up

Furthermore if I do not generate the columns and instead do it myself

BoundColumn dgc = new BoundColumn();
dgc.DataField = "BasicWage";
dg.Columns.Add(dgc);

I get A field or property with the name 'BasicWage' was not found on the
selected datasource.

Any insight or workarounds gratefully recieved.

Thanks,

Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top