Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

2 Identical DataGrids...moving a selected ROW

Posted on 2004-09-07
3
Medium Priority
?
182 Views
Last Modified: 2011-04-14
I have a User form which has 2 Datagrids...

Blocked Branches                  Allowed Branches
--------------------                 ------------------------
|   Branch1       |      >>       |     Branch2          |
|   Branch3       |                 |                          |
|                      |       <<      |                          |
|                      |                 |                          |
--------------------                 -----------------------

They both have the exact same layout (4 Columns)

When a user clicks on >> button...I want to move the selected BLOCKED Branch ROW
into the ALLOWED Branch Grid...Is there a grid function that will COPY an entire ROW or do I have
to move each column into variables...and build a Row to ADD to Allowed Branches...
My code so far is...

'*****************************************************
'User wants to move selected BLOCKED Branch to ALLOWED
'*****************************************************
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If dgBlockedGrid.VisibleRowCount < 1 Then
            MsgBox("There are no more Blocked Branches.")
        Else
            Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
            Dim oSelectedCell As DataGridCell
            Dim oSelectedItem As Object

            oSelectedCell = dgAllowedGrid.CurrentCell
            oSelectedItem = dgAllowedGrid.Item(oSelectedCell.RowNumber, 3)
            fkUserID = CInt(oSelectedItem)

        End If
End Sub
0
Comment
Question by:natloz
  • 2
3 Comments
 
LVL 7

Author Comment

by:natloz
ID: 11998539
This is a Windows Application
0
 
LVL 7

Accepted Solution

by:
natloz earned 0 total points
ID: 11998725
Figured out a better way...when the user clicks the button, I update the database with the new rights to the branches, and refresh my grids with the new security matrix...don't need to mess with moving rows this way.

Thanks...
0
 

Expert Comment

by:ee_ai_construct
ID: 11998998
Closed, 500 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question