开发者

Unbound Data Repeater Scroll Issue

  1. I Dragged a DataRepeater into my form.

  2. Added a TextBox to the DataRepeaterItem.

  3. Added A button to the form.

  4. Wrote these 2 Lines of Code :

    Private Sub Button1_Click(..) Handles Button1.Click DataRepeater1.VirtualMode = True DataRepeater1.AddNew() End Sub

  5. Run Project

  6. Press Add Button

  7. in the textBox Write "1"

  8. Press Add Button

  9. in the textBox Write "2"

    开发者_开发技巧
  10. Press Add Button

  11. in the textBox Write "3"

  12. Press Add Button

  13. in the textBox Write "4"

Till Here Every Thing is Fine.

Then Scroll data repeater Up

"1" Changes to default TextBox1

Why Does it happen. How can I prevent it from happening.

Thanks in Advance.


The repeater control isn't going to hold all the values by itself. In virtual mode you don't have to use a datasource, but you have to use something. In this example, they used a simple Integer array: VB.NET Repeater Simple Data Binding Without Datasource

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜