Re: controls question

Discussion in 'ASP .Net' started by szabelin, Aug 6, 2003.

  1. szabelin

    szabelin Guest

    Hi Marina, I have tried DataGrid. I need to
    hide/expand/show subrows, so I thought I had more control
    drawing the Table myself.

    Do you have any suggestions for my questions?

    Thanks!



    >-----Original Message-----
    >Have you considered using a DataList or similar control?

    With a Datalist
    >with viewstate enabled, you don't have to worry about any

    of this.
    >
    >"szabelin" <szabelin@szabelin> wrote in message
    >news:034e01c35c3f$3ed494c0$...
    >> Hello. In my control I dynamically create a Table with
    >> custom rows which include checkboxes.
    >>
    >> On each postback I have to recreate the table
    >> (unfortunately).
    >>
    >> Question 1: how does the framework remember which
    >> checkboxes stay checked given that I have to recreate

    the
    >> table each time?
    >>
    >> Question 2: when a button is clicked I have to recreate
    >> the table first in Page_Load handler, second in the
    >> button's event handler. Is there any way to avoid that?

    I
    >> am having problems with this approach because on the

    next
    >> postback I try to get a list of selected checkboxes -

    and
    >> it's empty (even though I have several checked)
    >>
    >>
    >> Thank you very much

    >
    >
    >.
    >
    szabelin, Aug 6, 2003
    #1
    1. Advertising

  2. szabelin

    Marina Guest

    I am talking about the DataList, not the DataGrid.

    The DataList, as part of its template, might need another DataList, to
    render the subrows.

    You could write custom javascript to do this if necessary.

    You might want to consider looking into a 3rd party grid that supports
    hierarchical data.

    "szabelin" <szabelin@szabelin> wrote in message
    news:013701c35c42$53f0c1f0$...
    >
    > Hi Marina, I have tried DataGrid. I need to
    > hide/expand/show subrows, so I thought I had more control
    > drawing the Table myself.
    >
    > Do you have any suggestions for my questions?
    >
    > Thanks!
    >
    >
    >
    > >-----Original Message-----
    > >Have you considered using a DataList or similar control?

    > With a Datalist
    > >with viewstate enabled, you don't have to worry about any

    > of this.
    > >
    > >"szabelin" <szabelin@szabelin> wrote in message
    > >news:034e01c35c3f$3ed494c0$...
    > >> Hello. In my control I dynamically create a Table with
    > >> custom rows which include checkboxes.
    > >>
    > >> On each postback I have to recreate the table
    > >> (unfortunately).
    > >>
    > >> Question 1: how does the framework remember which
    > >> checkboxes stay checked given that I have to recreate

    > the
    > >> table each time?
    > >>
    > >> Question 2: when a button is clicked I have to recreate
    > >> the table first in Page_Load handler, second in the
    > >> button's event handler. Is there any way to avoid that?

    > I
    > >> am having problems with this approach because on the

    > next
    > >> postback I try to get a list of selected checkboxes -

    > and
    > >> it's empty (even though I have several checked)
    > >>
    > >>
    > >> Thank you very much

    > >
    > >
    > >.
    > >
    Marina, Aug 6, 2003
    #2
    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. trinitypete

    HTML Controls and User controls

    trinitypete, Jun 25, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    3,373
    trinitypete
    Jun 26, 2003
  2. Arulraja
    Replies:
    3
    Views:
    1,373
    William F. Robertson, Jr.
    Oct 17, 2003
  3. Jeff Tolman
    Replies:
    0
    Views:
    2,969
    Jeff Tolman
    Nov 4, 2003
  4. Axel Dahmen
    Replies:
    1
    Views:
    486
    Teemu Keiski
    Nov 12, 2003
  5. Nathan Sokalski
    Replies:
    4
    Views:
    1,141
    Muhammad Naveed Yaseen
    Sep 5, 2007
Loading...

Share This Page