Results 1 to 5 of 5

Thread: data repeater

  1. #1
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634

    Unanswered: data repeater

    I am trying to use the data repeater in a Windows app (not a web form) to display data in an array. All the information I find seems to be for web forms and says to do this:

    DataRepeaterName.DataSource=ArrayName
    DataRepeater.DataBind()

    The Problem I'm having is that there is no DataBind option under the DataRepeater. Any suggestions would be welcome.

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    wouldn't that be...

    Code:
    DataRepeaterName.DataSource=ArrayName
    DataRepeaterName.DataBind()
    If you want to post your code sample we might be able to help some more.

  3. #3
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Thanks for the reply Rokslide.

    I tried both ways (and anything else I could think of) and have been completely unsuccessful using an array as the datasource.

    I have found two ways to get what I want using a structure turned class or a dataset. I'm still play with both to figure out the pros and cons for a couple of small apps that I'm working on. One needs to keep user settings from one session to the next and the other fetches data from various txt files each time it is opened. Neither of them use a database.

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    I was just reading through some of the documentation for the datareader...

    DataRepeater.DataSource Property (Microsoft.VisualBasic.PowerPacks)
    Setting the DataSource property of the DataRepeater control has no effect. The DataSource properties of the child controls determine what is displayed at run time.
    So inside your repeater you should have controls for displaying your data and you bind to them.

  5. #5
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    I had the control set to the elements of the array. The closest I got was having the controls display the values of the last record of the array in the controls for all records - if there were 5 records in the array the data repeater would display the values from the last record 5 times.

Posting Permissions

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