Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 26th, 2010, 07:39 PM
Friend of Wrox
Points: 660, Level: 9
Points: 660, Level: 9 Points: 660, Level: 9 Points: 660, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: St. Louis, , .
Posts: 101
Thanks: 0
Thanked 1 Time in 1 Post
Default In C# (or in C# with WPF), how would I build a checkbox at run time?

In C# (or in C# with WPF), how would I build a checkbox at run time? I would I be able to query the check box to see if the user clicked on it?

In other words, suppose I have a "grid" on which I want to have displayed some checkboxes. But I do not know how many checkboxes to display. I suppose I could (in WPF) fill the grid with checkboxes at design time and mark them as hidden (or visibly == false) and then show them at run time. But I was hoping there was a more elegant way to do this.
  #2 (permalink)  
Old June 29th, 2010, 10:22 PM
Authorized User
 
Join Date: Jul 2007
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the pseudo code

GridViewCell myCheckboxCell = new GridViewCell();
myCheckboxCell .cellStyle = checkbox;

//Add new row
myGridView.Rows.Add(1);
myGridView.Rows[ ].Cell[ ] = myCheckBoxCell

I believe there are other ways to do it.
Refer
http://msdn.microsoft.com/en-us/libr...boboxcell.aspx

With regards,
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access: Checkbox input to build query soglejr Access 4 January 28th, 2008 09:49 AM
BUILD FAILED during run ANT Nimeshkd EJB 0 October 19th, 2007 12:04 AM
Design-Time or Run-Time now ? ALGNET .NET Framework 2.0 1 July 31st, 2006 04:43 AM
Run time Help Dazzer96 Access VBA 2 May 3rd, 2006 07:03 AM
Any run time version? jeffcflam Crystal Reports 0 March 8th, 2004 04:43 PM



All times are GMT -4. The time now is 04:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.