Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 July 16th, 2005, 05:41 AM
Authorized User
 
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Baby_programmer Send a message via MSN to Baby_programmer Send a message via Yahoo to Baby_programmer
Default Moving rows up and Down in Datagrid

Hi there!
 friends i have problem that i want a datagrid that have number of rows when the specific row is selected it should be able to move up or down by clicking UP and Down button Respectively.
I have done that by swaping the rows content ...but the problem is that the selected row moves upward but the selected row color remains there...if any budy have some other idea or related link please help me in that, Thanx in advance

ashfaq
__________________
Baby Prgrammer
 
Old July 16th, 2005, 09:47 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

When you change the row contents you also need to set the new SelectedItemIndex of the grid. This will change the selected row. The one problem with this is that you need to rebind the grid. So you will probably need to change the underlying data of the grid instead of just changing the row contents.

-Peter
 
Old July 18th, 2005, 07:12 AM
Registered User
 
Join Date: Jul 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<div style="height:256px;overflow:auto">
  <datagrid>
</div>


U set the Height and Width parameter as per your requirement.


Any ploblem then tell i solve it my best.

id-> [email protected]

 
Old July 18th, 2005, 07:14 AM
Registered User
 
Join Date: Jul 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Baby_programmer
 Hi there!
friends i have problem that i want a datagrid that have number of rows when the specific row is selected it should be able to move up or down by clicking UP and Down button Respectively.
I have done that by swaping the rows content ...but the problem is that the selected row moves upward but the selected row color remains there...if any budy have some other idea or related link please help me in that, Thanx in advance

ashfaq
 
Old July 18th, 2005, 07:15 AM
Registered User
 
Join Date: Jul 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<div style="height:256px;overflow:auto">
  <datagrid>
</div>


U set the Height and Width parameter as per your requirement.


Any ploblem then tell i solve it my best.

id-> [email protected]

 
Old August 20th, 2006, 04:14 AM
Registered User
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi friends
 i have problem that i want a datagrid that have number of rows when the specific row is selected it should be able to move up or down by clicking UP and Down button Respectively.
Sreedhar






Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving rows in Datagrid view control in C# Bob337 General .NET 0 June 9th, 2007 10:13 AM
moving datagrid contents into a datalist sarah lee ASP.NET 1.0 and 1.1 Basics 0 October 24th, 2006 10:52 AM
Moving a Dataset in a Datagrid up or down TheRealEclipser ASP.NET 1.0 and 1.1 Professional 1 March 13th, 2006 01:02 AM
How to add rows in DataGrid ? vivekian ASP.NET 1.0 and 1.1 Professional 0 March 13th, 2005 04:30 AM
rows in Datagrid drachx General .NET 0 October 20th, 2004 08:02 PM





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