Solved

2 Identical DataGrids...moving a selected ROW

Posted on 2004-09-07
3
173 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now