Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: controls question


    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$a301280a@phx.gbl...
    >> 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 Guest

  2. Similar Questions and Discussions

    1. - Dynamic controls question
      I have a Table in my page. I must load some webcontrols dynamically into this table, after the click of a button. These dynamic controls can fire...
    2. newbie question on Custom Controls in C#
      I have just started working on an ASP.Net 1.0 project as my first forray into ASP.Net (or ASP for that matter), and have a general question about...
    3. High-level question about ASP.NET web controls..
      I'm a bit of a noob when it comes to web controls... What I want to do, is create web control that appears in the toolbox, that one could drag onto...
    4. Question about Custom Controls
      Dear all I'm building a web application that some standard controls in many pages as "DropDownlist" this drop down list is filled from a table in a...
    5. Question on Server Controls
      Hi to all, How would I use a public string property to use a color converter effectively? Yes, you can use a Color type for this property but...
  3. #2

    Default Re: controls question

    You want dynamic controls? then you have to live with this. I have to do
    the same
    I don't like it but that's the way it is for now
    The framework can be smarter and recreate the previously created dynamic
    controls on postback or something
    It does not today and you have to do it yourself
    Good luck and I hope you find a better solution and share it with us

    J

    "szabelin" <szabelin@szabelin> wrote in message
    news:034e01c35c3f$3ed494c0$a301280a@phx.gbl...
    > 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

    MS News \(MS LVP\) Guest

  4. #3

    Default Re: controls question

    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$a401280a@phx.gbl...
    >
    > 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$a301280a@phx.gbl...
    > >> 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139