Questions tagged [controlcollection]
28 questions
0
votes
1 answer
Linq To Select All controls where DI contains some text from ControlCollection
Linq has always befuddled me. I am trying to extract all controls from an ASP.Net form page where the ID of the control contains a specific string. The control collection is hierarchical and I want to return any matching controls from all levels. Am…

tjams
- 3
- 1
0
votes
3 answers
C# Unable to loop through control collection and set properties on a user control in Windows Forms
Hi I have a Forms application that uses a custom control based on a Track bar called colorSlider. This control was obtained from code project and added to the tools in VS2017. All aspects of the control work fine. I can change any properties as I…

Tom
- 527
- 1
- 8
- 28
0
votes
0 answers
Why are all the pictureBoxes in flowLayoutPanel controls collection displaying the same image?
I have a flowLayoutPanel that has pictureBoxes in it. I add multiple PictureBoxes at run time like this:
while (flowLayoutPanel1.Controls.Count < 10)
{
flowLayoutPanel1.Controls.Add(new PictureBox());
}
I have a…

Eric Snyder
- 1,816
- 3
- 22
- 46
0
votes
1 answer
Manage a ControlCollection - display a new element at the bottom
I need to add a simple at the bottom of an existing view. It is composed of nested panels in a code which I know is not proper. But what I want given my available time is (simple as it sounds) to add my link below what is existing.
In a few words,…

Gaël
- 117
- 1
- 2
- 17
0
votes
2 answers
Delphi, Show button in a different TGridPanelLayout cell
Hi I am working with XE6 and I am using a TGridPanelLayout with 4 col and 4 rows. On the first cell I am displaying a Button. What I would like to do is, that when I click on this Button, get that Button to appear in a different cell. But I cannot…

petter
- 83
- 1
- 5
0
votes
3 answers
Create and loop through collection subset of controls
Im making a small vb.net windows form application in which I have 4 ComboBoxes. I would like to add the ComboBoxes to a collection and be able to loop through that collection to refer to each one.
There are other ComboBoxes on the form so I cannot…

Toby
- 9,696
- 16
- 68
- 132
0
votes
0 answers
What would cause a ControlCollection to be reordered after Show()?
I'm at a loss to explain why the items in a ControlCollection would be reordered after a Show() method - maybe some here might know. I'm working on an older application written in VB.NET using .NET 2.0/VS2008 (yuk, I know ... but it's work)
There…

HiDefLoLife
- 555
- 1
- 8
- 28
0
votes
1 answer
Cell Edits to SpreadsheetGear WorkbookView aren't persisting
What's going wrong:
When I edit a cell in a SpreadsheetGear WorkbookView, and initiate the CellEndEdit event by either hitting Enter, Tab, or any of the arrow keys, the value I just typed is wiped out.
Context:
It seems that when editing a cell in…

Jake Smith
- 2,332
- 1
- 30
- 68
0
votes
1 answer
How do I join two control collections for use with foreach statement
As per the question I have two panels on my form one called leftPanel and one called rightPanel. These control a two column layout on my form.
I also have collapsing/expanding groupboxes inside these panels and I wish to iterate over each one to…

Ryan Buddicom
- 1,131
- 15
- 30
0
votes
1 answer
cannot convert from 'System.Web.UI.ControlCollection' to 'System.Collections.Generic.IEnumerable'
I would like to clear and dispose of all the components inside of an asp:panel. I am receiving the error:
cannot convert from 'System.Web.UI.ControlCollection' to 'System.Collections.Generic.IEnumerable'
Heres my code:
List ctrls = new…

CodeMan5000
- 1,067
- 2
- 12
- 21
0
votes
1 answer
Using CreateControlCollection() from within a WebMethod
my code calls a WebMethod. Within that WebMethod I have the need to create a new control collection. In VB I would normally write:
Dim cc As System.Web.UI.ControlCollection = CreateControlCollection()
But because I'm inside a WebMethod, I get…

wotney
- 1,039
- 3
- 21
- 34
-1
votes
2 answers
runat="server" div causes System.Web.HttpException when accessed from control collection
I have a div that is runat="server". The div is contained in a panel, and within the div are some controls. All of the controls outside of the div (but within the panel) are cleared when I run my "ClearControlsInPanel()" method, which looks like…

CptSupermrkt
- 6,844
- 12
- 56
- 87
-2
votes
2 answers
Is duplicate string index in ControlCollection possible? And how does it work?
I'm starting a small project in WinForms C# and have something like this:
UserControl uc1 = new UserControl();
UserControl uc2 = new…

HiImEins
- 42
- 4