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. Advertisements

  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. Advertisements

  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. Advertisements

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. Subba Rao via DotNetMonster.com

    script for moving rows up and down and traverse thru rows of HTML table

    Subba Rao via DotNetMonster.com, Mar 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    8,862
    Subba Rao via DotNetMonster.com
    Mar 19, 2005
  2. helpful sql
    Replies:
    0
    Views:
    1,050
    helpful sql
    May 19, 2005
  3. Bob Loveshade
    Replies:
    1
    Views:
    7,932
    Venkat_KL
    Nov 19, 2005
  4. .NETn00b
    Replies:
    0
    Views:
    608
    .NETn00b
    Nov 19, 2005
  5. Replies:
    0
    Views:
    385
  6. .NETn00b

    Selecting and Highlighting Multiple Rows in a DataGrid

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

    Group By Rows and Total Rows

    yonialhadeff, Jan 23, 2007, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    1,050
    Eliyahu Goldin
    Jan 23, 2007
  8. Thommes
    Replies:
    2
    Views:
    169
    Octo Mancer
    Mar 10, 2005
Loading...