Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 August 16th, 2005, 12:38 PM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Use Checkbox to select and edit datagrid rows

I have developed an ASP.NET datagrid control, the datagrid control has multiple editable columns with on column containing a dropdown list.
I use the Item Command Edit, Update and Cancel buttins to make the grid editable, then save the changes to the dataset using the Update button. Finally I update the database with this updated dataset with a button placed outside the grid.
Now I want to implement the same datagrid but this time using a checkbox.
I should be able to select multiple rows at one time, edit the values in them, then finally update the database with the updated values in the dataset.
Please advice on moving forward with this one.

Thanks!
 
Old August 16th, 2005, 11:52 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I am not sure this can be done. You can have a grid where all the rows are editable at the same time

http://www.superdotnet.com/Article.aspx?ArticleID=183


 
Old August 19th, 2005, 01:03 AM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

All the three parts of the article provide excellent background on how to update the dataset for multiple rows.

In my case what I did is for each datagrid Item I checked if the CheckBox is checked or not,

I then changed the values in the textbox and dropdown to the desired values and then iterated throug these values to save the changes to the session dataset. Once the dataset was updated I have the option of updating the dataset using the dataadaptors update command.

Thanks the link was really helpful :)
 
Old August 19th, 2005, 01:42 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Glad to help

Jim






Similar Threads
Thread Thread Starter Forum Replies Last Post
disable the checkbox in edit mode of datagrid swati_joshi ASP.NET 1.0 and 1.1 Professional 3 May 10th, 2007 07:35 AM
Select Rows From A datagrid without a checkbox nkrust ASP.NET 2.0 Basics 0 January 10th, 2007 01:34 AM
cannot detect selection of checkbox datagrid edit swati_joshi ASP.NET 1.0 and 1.1 Basics 0 April 21st, 2006 08:23 AM
cannot detect selection of checkbox datagrid edit swati_joshi ASP.NET 1.0 and 1.1 Professional 0 April 21st, 2006 08:21 AM
disable the checkbox in edit mode of datagrid swati_joshi ASP.NET 1.0 and 1.1 Basics 1 April 20th, 2006 01:44 PM





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