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
jarrod - 06 Jan 2004 19:07 GMT
For anyone interested here is a good start:
http://teched2003downloads.mymsevents.com/HOLTechEd/DEVHOL20.doc
although if anyone has any examples with the template created
dynamically in the codebehind file that would still be helpful.
Thanks,
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
[quoted text clipped - 14 lines]
>
> Jarrod
Martine - 08 Jan 2004 09:54 GMT
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.
> 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
[quoted text clipped - 14 lines]
>
> Jarrod