Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Panel to Grid Containing Textboxes

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
0
36
US
Is it possible to add a panel (or other control) to a grid that would contain multiple textboxes or other controls. What I'm trying to accomplish is to have each row show something like the following. Is there a free or low cost gird control that does this already? I've seen some online that suggest they can do this. Any recommendations?

----------------------------------------------------------
ABC Company Order Total: $500.00
1234 Mocking Bird Lane Item Count: 123
Columbus
OH
----------------------------------------------------------
XYZ Company Order Total: $400.00
5678 Bedrock Drive Item Count: 15
Ann Arbor
MI
----------------------------------------------------------


Auguy
Sylvania/Toledo Ohio
 
I don't think a repeater control available in .net forms

A listview can do it; not exactly but like
[tt]
ABC Company
------------------------
Order Total: $500.00
1234 Mocking Bird Lane
Item Count: 123
Columbus
OH

XYZ Company
------------------------
Order Total: $400.00
5678 Bedrock Drive
Item Count: 15
Ann Arbor
MI
[/tt]
Look into grouping in listview if you are interested this way.

And if it is only a display purpose see ReportViewer control

Zameer Abdulla
 
Thanks Zameer, I will take a look at the Report Viewer, it might be just what I need. Do you know if there is a click or dbl-click event on the report? What I want to do is display another form when the user clicks on one of the items in the report. Maybe I can use the drill down feature to get this done.


Auguy
Sylvania/Toledo Ohio
 
How about creating a UserControl that houses the distinct values you want and then loading them into a grid as needed?? You could then create any distinct events and code you needed for each one.

Another option...In the Visual Basic Power Pack (free download, just do a web search) there was/is a Data Repeater control for WinForms. I know I used this with a couple projects in VS2008 in my younger days and don't know if there is one for VS2010 (I tend to just create my own controls for the flexibility and control). It operates quite like the WebForms Repeater control, but I did note a bit of performance hit when loading a larger set of records into it. It provides basic functionality and probably would meet your needs, but I would still look at a custom control.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
C#.NET Programmer
 
Realized I stated one part of my first paragraph wrong....It should read:

How about creating a UserControl that houses the distinct values you want and then loading them into a grid panel as needed?? You could then create any distinct events and code you needed for each one.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
C#.NET Programmer
 
Thanks Robert. I think I need to do some more research and testing using your suggestions.

Love your Calvin and Hobbs reference. When my son was little he read all of the books over and over. He even won a trivia contest because he remembered some obscure historical fact Calvin had used.


Auguy
Sylvania/Toledo Ohio
 
Does anybody have any recommendations for a third party grid control?


Auguy
Sylvania/Toledo Ohio
 
The DevExpress XtraGrid looks pretty good, not too pricey. Anybody have any experience with this control?

Auguy
Sylvania/Toledo Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top