objectlist - hide columns in details view

J

jarrod

How can you hide columns in the details view of an objectlist control?
In the table view you can hide and show any columns you wish by
setting the field properties (ex: Visible = false;) and the
objectList.TableFields list to display the number of columns you wish
to display.

The Details view always displays all columns even if the Visible
propery is set to false for the column. I assume I will need to write
a custom itemDetailsTemplate, or something like that but I am not sure
what needs to be done, or the format that it should be in.

So if anyone has any examples of how to customize what is displayed in
the details view (not the header, and commands but the actual data) it
would be greatly appreciated.

Thanks,

Jarrod
 
M

Martine

You do not have to use templates, instead use the Fields-collection of
the ObjectList. Add the fields you want to display like this in
runtime (or define the fields at design-time):

ObjectListField OLFemployee= new ObjectListField();
OLFemployee.Title = "Employee";
OLFemployee.DataField = "empl";
olf_Employee.DataFormatString = "whatever";
objectListEmployees.Fields.Add(OLFemployee);

I hope this helps,
kind regards, Martine.
 

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,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top