CurrencyManager w/ multiple positions

I've been trying to come up with a vb.net replacement for an Access program that we've been using for several years now.  The Access forms use the 'continuous' layout that works very well for our situation.

I am trying to recreate this in vb.net using a panel with repeated usercontrols and a vscrollbar.  Originally, I tried creating a usercontrol for each row in the dataset but this wasn't feasible for large datasets.  Now I am trying to create the same effect with a static number of usercontrols by just changing the row displayed in each of the controls.  The vscrollbar is hooked to the position property of the first usercontrol's currencymanager.  I want to then hook the second usercontrol to the first usercontrol's position property + 1, etc.  Is there a way to bind two or more controls to different positions on the same currencymanager

Also, when I set up my panel to display more than about 5 usercontrols, it seems to take a while to lay them out.  However, I can display an entire datatable in a datagrid and the layout is almost instantaneous.  How can I speed up the layout of my usercontrols


Answer this question

CurrencyManager w/ multiple positions

  • TPV

    Well,

    You will have to do your databindings to each datarow.

    textbox1.databindings.add(new binding("Text",datarow,"ColumnName") 

    you would loop though your datatable and do this for each row

    Dim DR as datarow
    for each DR in DT.rows

    next

    Hope this helps.

  • Elisio

    I'm pretty confused here,

    Are you looking to just navagate between records

  • sunshine2005

    I want to be able to put my usercontrol on a form and control what record is shown using the position property of a currencymanager.  Then I want to put another identical usercontrol on the same form and have it always show the next record in the same data source (ie position+1).  Is that any more clear   Thanks.
  • CurrencyManager w/ multiple positions