Displaying and selecting a group of rows

Discussion in 'ASP .Net' started by =?Utf-8?B?TWlrZSBLZWxseQ==?=, Nov 14, 2005.

  1. Hi.

    I have a data table where rows are grouped according to a certain criteria
    and I want to be able to display all the rows that belong to the same group
    together on the screen. In addition, I want to provide the user with a way of
    selecting a single group. A radio button is the obvious choice, but other
    suggestions will be welcome.

    For example, the following is what I want to build:

    item a
    radio button item b
    item c
    ------------------------------
    item k
    radio button item l
    ------------------------------
    item x
    radio button item y
    item z
    item w
    ------------------------------


    How do I do it? Repeater, GridView, other?
     
    =?Utf-8?B?TWlrZSBLZWxseQ==?=, Nov 14, 2005
    #1
    1. Advertising

  2. Repeater should be fine. Bind it to the sorted table of items. Make an item
    template with a radio button. In PreRender event loop through the repeater
    items and detect the first item for every group. For this item make the
    radio button visible, for all other items hide it.

    Eliyahu

    "Mike Kelly" <> wrote in message
    news:...
    > Hi.
    >
    > I have a data table where rows are grouped according to a certain criteria
    > and I want to be able to display all the rows that belong to the same

    group
    > together on the screen. In addition, I want to provide the user with a way

    of
    > selecting a single group. A radio button is the obvious choice, but other
    > suggestions will be welcome.
    >
    > For example, the following is what I want to build:
    >
    > item a
    > radio button item b
    > item c
    > ------------------------------
    > item k
    > radio button item l
    > ------------------------------
    > item x
    > radio button item y
    > item z
    > item w
    > ------------------------------
    >
    >
    > How do I do it? Repeater, GridView, other?
     
    Eliyahu Goldin, Nov 14, 2005
    #2
    1. Advertising

  3. One possible implementation is using a datalist and radio buttons as I did
    in this sample http://www.societopia.net/Samples/DataList_Hierarchy.aspx
    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "Mike Kelly" wrote:

    > Hi.
    >
    > I have a data table where rows are grouped according to a certain criteria
    > and I want to be able to display all the rows that belong to the same group
    > together on the screen. In addition, I want to provide the user with a way of
    > selecting a single group. A radio button is the obvious choice, but other
    > suggestions will be welcome.
    >
    > For example, the following is what I want to build:
    >
    > item a
    > radio button item b
    > item c
    > ------------------------------
    > item k
    > radio button item l
    > ------------------------------
    > item x
    > radio button item y
    > item z
    > item w
    > ------------------------------
    >
    >
    > How do I do it? Repeater, GridView, other?
     
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=, Nov 14, 2005
    #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. Bob Loveshade
    Replies:
    1
    Views:
    7,681
    Venkat_KL
    Nov 19, 2005
  2. .NETn00b
    Replies:
    0
    Views:
    504
    .NETn00b
    Nov 19, 2005
  3. Replies:
    0
    Views:
    280
  4. .NETn00b

    Selecting and Highlighting Multiple Rows in a DataGrid

    .NETn00b, Nov 19, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    129
    .NETn00b
    Nov 19, 2005
  5. yonialhadeff

    Group By Rows and Total Rows

    yonialhadeff, Jan 23, 2007, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    850
    Eliyahu Goldin
    Jan 23, 2007
Loading...

Share This Page