473,413 Members | 1,807 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,413 software developers and data experts.

swaping datagrid rows

In my project i have a datagrid the values that are shown are taken from the database additional values can also be entere through a textbox on that form. i would like to add a dropdown list to that datagrid which will be generated in each row. In that dropdownlist i want the full count of the rows that are generated in each dropdownlist and i would like to swap the rows means(the entire content of that row will be shifted if i want to interchange the content of 1st on 3rd the contents should be inter changed ) how can i do
Nov 6 '06 #1
5 1393
Banfa
9,065 Expert Mod 8TB
Ping - anyone help with this?
Nov 23 '06 #2
No can you help me in this case please its that urgent
Dec 1 '06 #3
cr115
9
I might be wrong and this might not be what you asking for but to swap rows don't you just have to click on the gird go to the little play button on the top right and go into properity builer, then go into columns and change them there....Like i said this might not be what you asking for but I tryed.
Dec 1 '06 #4
Frinavale
9,735 Expert Mod 8TB
This isn't a simple question.

How are you currently populating the datagrid?

It's when you're populating the datagrid that you'll add the dropDownList to each row.

Every time you add a new row to the dataGrid, you will have to repopulate both the dropDownList and the dataGrid.

Have you considered maybe not using a dropDownList and using the "Edit" function instead?
Have a column displaying the row number of each row and then allow the person to edit this value to indicate what row they would like to swap it with. This way you could have the function that handles the dataGrid's edit-update event do the switching for you.

You might want to start there and then do some experimenting with the dropDownList later.

Doing one thing at a time always makes life easier.

Good luck.
Dec 1 '06 #5
In my form i have two textboxes one add button and a datagrid inside that grid there is three template column one is a drop down list and two textbox.In the first text box i can enter value and if i press the add button it will be entered in the databse and shown in the datagrid at the same time. in the dropdown list i want the full listing of the count of rows eg: if i had five rows the values in side the dropdownlist should be like 1,2,3,4,5 like wise if i had added one more row so there is 6 now the count is 1,2,3,4,5,6 this ll be filled on each rows of the datagrid. why i am keeping this is to set the priority of the rows that are added if supose i want to display the 4th step as the 1st step i want to interchange the contents of the text boxs in both rows through the change in the value of dropdownlist
Dec 2 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Soul | last post by:
*** I am not sure this question belong to *.languages.csharp or *.framework.windowsdorms.databinding, so I post to both *** Hi, Currently I have a DataGrid which bind to a DataSet. One of...
5
by: BBFrost | last post by:
Win2000 ..Net 1.1 SP1 c# using Visual Studio Ok, I'm currently in a "knock down - drag out" tussle with the .Net 1.1 datagrid. I've come to realize that a 'block' of rows highlighted within...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
2
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
5
by: Genojoe | last post by:
I am using code from Help with two exceptions. (1) I increased the number of sample rows from 3 to 20, and (2) I anchored the datagrid to bottom of form so that I can change the size of the grid by...
4
by: Jan Nielsen | last post by:
Hi all I'm a former Access developer who would like to implement a many-to-many relation in about the same way you do in Access: With a subform and a combo box. Is it possible to use a...
0
by: rn5a | last post by:
All the rows in a DataGrid are accompanied by a CheckBox. When a user checks the rows & clicks a Button, the checked rows get deleted. For e.g. assume that the DataGrid displays 10 rows. A user...
11
by: mukeshrasm | last post by:
Hi I want to swap the content of rows up or down based on the corresponding button clicked. <table border="0" width="200"> <tr> <td>first name </td><td>last name</td><td...
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: 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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.