LoadTemplate logic in DataList

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

  1. #1

    Default LoadTemplate logic in DataList


    I have a three-level drilldown report. The top level is a DataList. When
    an item is selected, a new DataList is instantiated in the SelectedItem
    template. I'd like to have the same thing happen when going to the third
    level, but there's a catch. Depending on what's selected on the second
    level, the template for the third level will be different. I have played
    with the LoadTemplate method but cannot figure out how to apply my
    condition from the second-level selection. As I understand loadtemplate,
    it needs to be called from the Page_Init function, but I want to base
    the template selection on the second-level DataList's ItemCommand
    command name. This is usually grabbed from the DataList's
    CommandEventArgs.

    Am I missing something about this?

    Thanks in advance.


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Barry Guest

  2. Similar Questions and Discussions

    1. Logic
      I need some help. I have 2 loops. One to find a RadioButtonList in datagrid and second in Session("Answ"). I am trying to assing value from...
    2. ItemCommand not fired with LoadTemplate
      Hello, I have extended a webserver control from the datagrid control. This datagrid adds an ItemTemplate dynamically via the LoadTemplate...
    3. Logic Error
      Hi There I am developing a small Purchase Order application and have run into a small issue I have a two tables called PODetails and POHeader...
    4. logic help please
      Hi, I need a sprite to check where its member's position is in a large nested list (which is a combination property and linear list). Here is the...
    5. LoadTemplate is very slow
      Hey. Creating a Datagrid programmatically works fine, but there seems to be a huge performance hit when you use LoadTemplate- Dim MyTemplate As...
  3. #2

    Default LoadTemplate logic in DataList


    I have a three-level drilldown report. The top level is a DataList. When
    an item is selected, a new DataList is instantiated in the SelectedItem
    template. I'd like to have the same thing happen when going to the third
    level, but there's a catch. Depending on what's selected on the second
    level, the template for the third level will be different. I have played
    with the LoadTemplate method but cannot figure out how to apply my
    condition from the second-level selection. As I understand loadtemplate,
    it needs to be called from the Page_Init function, but I want to base
    the template selection on the second-level DataList's ItemCommand
    command name. This is usually grabbed from the DataList's
    CommandEventArgs.

    Am I missing something about this?

    Thanks in advance.


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Barry Guest

  4. #3

    Default Re: LoadTemplate logic in DataList

    I should clarify that because the second level DataList is embedded
    within the top-level's SelectedItemTemplate, it is late-bound, which
    does not allow me to directly interact with it inside the Page_Init.

    Barry <barrygilbert@nospam.com> wrote in message news:<#Y8#vlSVDHA.1832@TK2MSFTNGP09.phx.gbl>...
    > I have a three-level drilldown report. The top level is a DataList. When
    > an item is selected, a new DataList is instantiated in the SelectedItem
    > template. I'd like to have the same thing happen when going to the third
    > level, but there's a catch. Depending on what's selected on the second
    > level, the template for the third level will be different. I have played
    > with the LoadTemplate method but cannot figure out how to apply my
    > condition from the second-level selection. As I understand loadtemplate,
    > it needs to be called from the Page_Init function, but I want to base
    > the template selection on the second-level DataList's ItemCommand
    > command name. This is usually grabbed from the DataList's
    > CommandEventArgs.
    >
    > Am I missing something about this?
    >
    > Thanks in advance.
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!
    Barry 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