objectlist - hide columns in details view

Discussion in 'ASP .Net Mobile' started by jarrod, Jan 5, 2004.

  1. jarrod

    jarrod Guest

    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, Jan 5, 2004
    #1
    1. Advertising

  2. jarrod

    jarrod Guest

    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





    (jarrod) wrote in message news:<>...
    > 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, Jan 6, 2004
    #2
    1. Advertising

  3. jarrod

    Martine Guest

    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.


    (jarrod) wrote in message news:<>...
    > 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
    Martine, Jan 8, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9l?=

    Show Details/Hide Details link button

    =?Utf-8?B?Sm9l?=, Mar 13, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    905
    dkode
    Mar 13, 2006
  2. Replies:
    2
    Views:
    423
  3. kenner

    Objectlist Details View problem

    kenner, Mar 15, 2005, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    116
    kenner
    Mar 15, 2005
  4. Carlo Folini

    ObjectList: showing details with master list

    Carlo Folini, Aug 5, 2005, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    162
    Carlo Folini
    Aug 5, 2005
  5. Replies:
    1
    Views:
    695
Loading...

Share This Page