Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 26th, 2005, 02:18 PM
Authorized User
 
Join Date: Nov 2004
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default Editing Grid with Checkboxes

Could someone please help me learn how to build the following app. I need a Grid that displays information from a query. I then want to have a series of checkboxes that determines the columns that are shown in the grid.

I have been trying this for the past two days, and I can't get it to work. I have the connection, and I can populate the grid just fine. I just don't know how to make the checkboxes change the sql query to display just the items checked.

Thanks in advance.
 
Old April 26th, 2005, 04:31 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Is this is rigid query? (Are you building something that hopes to work with any sql query or a specific one?)

Instead of trying to manipulate the sql query, it would probably be easier to manipulate the grid. After you bind the grid, you could modify the column settings in the grid to turn on/off the columns according to the checkbox states.

-Peter
 
Old April 27th, 2005, 08:54 AM
Authorized User
 
Join Date: Nov 2004
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How would one go about doing that? haha

 
Old April 27th, 2005, 09:50 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Go thru the grid's Columns collection and set each column's properties according to whatever tests you make against the checkboxes.

-Peter
 
Old April 28th, 2005, 04:45 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Hope this helps..

http://ganeshprof.blogspot.com/2005/...s-in-grid.html

Regards
Ganesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
grid view row editing event fired after postback sasidhar79 ASP.NET 2.0 Professional 0 January 30th, 2007 08:17 PM
Data Grid Editing in C# bmains C# 1 December 16th, 2004 04:23 AM
Data Grid editing of class bmains Pro VB.NET 2002/2003 3 October 22nd, 2003 12:38 PM





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