ASP.NET 2.0: problem with CompositeDataboundControl and GetSampleDataSource

Discussion in 'ASP .Net Web Controls' started by Jos, Aug 17, 2005.

  1. Jos

    Jos Guest

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

    I have overridden the GetSampleDataSource method, so that my control
    designer can provide dummy data.
    The problem seems to be that the GetDesignTimeHtml method is called three
    times when the control is refreshed in the designer.
    The first time the GetSampleDataSource method will also be called correctly,
    and all goes well.
    But the second and third time, GetSampleDataSource is not called, and some
    other sample data with column names such as "Databound Col0" is offered to
    the control, which it can't handle (it expects columns with particular
    names). I'm guessing that this is somehow caused by the DataSourceControl.

    Also, when a property is changed in the property pane, and this causes the
    control to rebind in the designer, GetSampleDataSource is not being called
    either, and the control is stuck again with "Databound Col0" columns.

    There is very little documentation on the net about this.
    GetSampleDataSource only gets 4 hits on Google.
    Does anybody know more about this problem?

    Jos
     
    Jos, Aug 17, 2005
    #1
    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. Umut Tezduyar
    Replies:
    0
    Views:
    405
    Umut Tezduyar
    Jun 29, 2006
  2. Umut Tezduyar
    Replies:
    0
    Views:
    705
    Umut Tezduyar
    Jul 2, 2006
  3. Jos
    Replies:
    1
    Views:
    193
  4. Samuel

    compositedataboundcontrol with template databinding problem

    Samuel, Mar 23, 2006, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    260
    Steven Cheng[MSFT]
    Mar 24, 2006
  5. Samuel

    CompositeDataBoundControl and "Failed to load viewstate"

    Samuel, Mar 22, 2007, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    403
    Walter Wang [MSFT]
    Mar 27, 2007
Loading...

Share This Page