CompositeControl & CompositeDataBoundControl question

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

  1. #1

    Default CompositeControl & CompositeDataBoundControl question

    Hi

    I want to create an n-tier custom server control.

    The idea is that the control will determine [at run-time] which "view" will
    be used. By this I mean User A may want the data displayed as a tree-view,
    User B as a datagrid etc, etc.

    So, I can envisage that in some circumstances it is using a data bound
    control and in others a non-data bound control - who knows. In which case,
    which do I inherit from - the CompositeControl or the
    CompositeDataBoundControl?

    Griff


    Griff Guest

  2. Similar Questions and Discussions

    1. Custom Templated CompositeControl/CompositeControlDesigner
      Hi, Myself and a colleague are attempting to mimic the custom template functionality of the ASP.Net 2 Login control. Essentially, we would like...
    2. CompositeControl and Toolbox
      This has been asked repeatedly many times and no one has been able to answer it. Now, I have the problem too..... why are CompositeControls so hard...
    3. [C#]My first CompositeDataBoundControl
      Hi, and thanks for this forum I'm trying to build a new control composed of an Image and dropdownlis First I succed to build the control...
    4. CompositeControl and ViewState
      I'm trying to create a CompositeControl derived class to implement a control that will enable people to edit an account object. The properties of an...
    5. ASP.NET 2.0: problem with CompositeDataboundControl and GetSampleDataSource
      I have a control derived from CompositeDataboundControl, which is working fine at run time, but I can't get the control to draw itself at design...
  3. #2

    Default Re: CompositeControl & CompositeDataBoundControl question

    Hey Griff, both TreeView and DataGrid (GridView) are Data Bound
    controls. Whenever you have a control that your binding to a
    repeatable datasource (something that implements IEnumerable) go with
    the CompositeDataBoundControl. It sounds like this is what you want.

    Even if you were not binding to a repeatable data source (let's say you
    were binding to a Detail view of a record that was shown in list) the
    CompositeDataBoundControl can help you out because it has a DataSource
    and other properties/methods. THis is something the CompositeControl
    doesn't have. This will help your end user have a consistent API with
    data related controls.

    If there's Data Involved, go with CompositeDataBoundControl. It has
    the necessary support for working with a datasource, whether it's
    repeatable or not.

    Michael Hamrah

    Griff wrote:
    > Hi
    >
    > I want to create an n-tier custom server control.
    >
    > The idea is that the control will determine [at run-time] which "view" will
    > be used. By this I mean User A may want the data displayed as a tree-view,
    > User B as a datagrid etc, etc.
    >
    > So, I can envisage that in some circumstances it is using a data bound
    > control and in others a non-data bound control - who knows. In which case,
    > which do I inherit from - the CompositeControl or the
    > CompositeDataBoundControl?
    >
    > Griff
    Michael Hamrah 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