473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Datagrid - moving a row

I have a datagrid that is populated with the columns automatically
generated. It is bound to a dataset (populated via XML).

I would like to physically move a row up and down a grid at run time. I
have added the push buttons to do this, and have the ItemCommand event
identified as where I need to add my code.

I am not sure how I can physically move a row. Is there a method for this
in the datagrid itself, or do I need to do it in the dataset instead?
Nov 18 '05 #1
1 1010
No, it is not in the grid, it is in the table. You need to order table
records by a certain key, change the key of the record you want to move and
than rebind the grid.

Eliyahu

"Philip Rayne" <pr****@nospam.me> wrote in message
news:ce*******************@news.demon.co.uk...
I have a datagrid that is populated with the columns automatically
generated. It is bound to a dataset (populated via XML).

I would like to physically move a row up and down a grid at run time. I
have added the push buttons to do this, and have the ItemCommand event
identified as where I need to add my code.

I am not sure how I can physically move a row. Is there a method for this
in the datagrid itself, or do I need to do it in the dataset instead?

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve B. | last post by:
I have a DataGrid on the left and TextBoxes (TB) on the right. The TB's reflect the contents of the grid cells. Sorting of columns (both thru VS and programmatically) work fine except, when the...
1
by: Krzysztof Karnicki | last post by:
I have such a problem… I have create my custom DataGridColumn inheriting from System.Windows.Forms.DataGridColumnStyle on using it on DataGrid, to show rows painted by me self. Because dates ...
4
by: KB | last post by:
I realised that if I use datagrid and datasource is a datatable, when I created a new row and while on that row I exit the datagrid (ie. without moving into the next row) and focus onto another...
3
by: AH | last post by:
Hi, I post this again to hope for valuable help. I have a window form order entry type of application where I used a datagrid to capture the order line detail. the datasource of this datagrid is...
3
by: simchajoy2000 | last post by:
Hi, I have been working with datagrids a lot in the past two weeks and I am running across a lot of problems. Maybe there is no way around these problems but I hope there are and someone out...
2
by: Gene Hubert | last post by:
I'm assigning a new datasource (a datatable) to a datagrid that is aready displayed in a form. Then I assign a new value to CurrentRowIndex. The datagrid always scrolls so that the new current...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
3
by: Antonio | last post by:
I am having a problem finding out how to page a datagrid. I have the procedure for moving from page to page as: private void changePage(object source,...
0
by: Brian Foree | last post by:
I'm having the following problem with an ASP.NET page (using the .NET Framework 1.1 and VS.NET 2003): I have a DataGrid that has several template columns that contain validators in the...
0
by: frostbb | last post by:
Ok, We've got a bunch of apps that we've migrated from Net 1.0 to Net 2.0. The apps were basically upgraded using the VS2005 migrate. The user control that was using a DataGrid.IsSelected(i)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.