Solved

2 Identical DataGrids...moving a selected ROW

Posted on 2004-09-07
3
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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