Windows Develop Bookmark and Share   
 index > Windows Forms General > Will there be a Data Repeater control released in C# for Windows Forms?
 

Will there be a Data Repeater control released in C# for Windows Forms?

Hello,

It seems that VB users have one available now. Are there any plans to add this or does anyone know of any sample code for repeating controls in TableLayoutPanel?

Thx

jkosh  Tuesday, May 20, 2008 1:13 PM

Hi,

There's not such Data Repeater control in C# for Windows Forms application, you can use a TableLayoutPanel instead, calling its Control.Add() method in a for loop to add controls into it,

Code Snippet

(int j = 0; j < this.tableLayoutPanel1.RowCount; j++)

{

for (int k = 0; k < this.tableLayoutPanel1.ColumnCount; k++)

{

TextBox t = new TextBox();

this.tableLayoutPanel1.Controls.Add(t, k, j);

}

}

Zhi-Xin Ye  Monday, May 26, 2008 9:19 AM
DataRepeater will be available in Visual Studio 2008 SP1.
Giorgi Dalakishvili  Monday, May 26, 2008 9:40 AM

Hi,

There's not such Data Repeater control in C# for Windows Forms application, you can use a TableLayoutPanel instead, calling its Control.Add() method in a for loop to add controls into it,

Code Snippet

(int j = 0; j < this.tableLayoutPanel1.RowCount; j++)

{

for (int k = 0; k < this.tableLayoutPanel1.ColumnCount; k++)

{

TextBox t = new TextBox();

this.tableLayoutPanel1.Controls.Add(t, k, j);

}

}

Zhi-Xin Ye  Monday, May 26, 2008 9:19 AM
DataRepeater will be available in Visual Studio 2008 SP1.
Giorgi Dalakishvili  Monday, May 26, 2008 9:40 AM
Just want to add a note here. DataRepeater control under the VisualBasicPowerPacks can be used for both VB and C#.
See my blog here for an introduction: http://blogs.msdn.com/vsdata/archive/2009/08/12/datarepeater-control-for-windows-forms.aspx

John Chen -- See my team blog: http://blogs.msdn.com/vsdata. All my posts are provided "AS IS" with no warranties, and confer no rights.
John Chen MS  Saturday, September 26, 2009 5:03 AM

You can use google to search for other answers

Custom Search

More Threads

• Finding Memory Leakage in windows forms
• Visual Studio Bug? Problems with TabControl
• From C# 2005 to C# 2008 problems
• Cntl - A or Cntl-F in a multiline text box
• Drag and Drop in C#?
• WIN32 API to map drive
• School Assignmnet
• Tab page showing Font Dialog
• Problems with clipboard : system.runtime.interopservices : The requested clipboard operation failed
• RichTextBox not adding lines of text quick enough.