Solved

Infragistics ultragrid controls

Posted on 2004-03-25
5
4,777 Views
Last Modified: 2012-06-21
Hi,

I am using Infragistics ultragrid controls in vb.net, after assigning the datasource to the grid it displays all the value as expected.

using the code how to move to the next row in the grid.  Ex. if i am currently in 3 row after changing  the value in the current cell ( After cell update event - ) after tab  out event or after lost focus  i want to move to next row of the grid.

Regards,
Kiran.




0
Comment
Question by:lkiran
5 Comments
 
LVL 1

Expert Comment

by:sendtojp
ID: 10684992
My opinion is to don't use data binding in Controls.  Open a ADO.NET recordset instead and change the ultragrid with code instead.  In VB6 most Experts would agree, however in VB.NET I have read that this is in much debate.  I still program in VB6 and use DBi-Tech controls now,  Infragistics appear to be #1 in controls for .NET .  I was wondering if the code was alittle 'long winded' needed to program these controls.

-JP
0
 
LVL 1

Author Comment

by:lkiran
ID: 10685115
I could able to do it using the ultragrid .activerow........

Cheers,
Kiran.
0
 
LVL 14

Accepted Solution

by:
ptakja earned 25 total points
ID: 10715764
Kiran,

Try the UltraGrid's PerformAction method.  For example, here's a KeyDown event handler that moves the focus to the cell below the current cell using PerformAction (My grid is named uwgColEditor).  Look for the lines appended with '<<<<<<< below.  I believe that ActiveRow may work too.


    ' ****************************************************************************************
    ' uwgColEditor_KeyDown
    ' ABSTRACT: KeyDown event handler.  This event is raised each time a key is pressed while
    '   a cell is active in the grid.  Here we are trapping the RETURN key.  When this
    '   key is pressed, the focus is moved to the next cell down in the grid.  This facilitates
    '   simplified editing since the user's hands don't have to leave the keyboard.
    '
    '   This routine does nothing for all other keys pressed in the grid.
    '
    ' ****************************************************************************************
    Private Sub uwgColEditor_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles uwgColEditor.KeyDown
        If Not c_cellBadCell Is Nothing Then
            e.Handled = True
            uwgColEditor.ActiveCell = c_cellBadCell
            uwgColEditor.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, False, False)
            c_cellBadCell = Nothing
        Else
            If Not ((uwgColEditor.CurrentState And UltraGridState.InEdit) = UltraGridState.InEdit) Then Exit Sub
            If e.KeyCode = Keys.Enter Then      'Enter Key pressed?
                uwgColEditor.PerformAction(UltraGridAction.ExitEditMode, False, False)     '<<<<<<<
                uwgColEditor.PerformAction(UltraGridAction.BelowCell, False, False)          '<<<<<<<
                uwgColEditor.PerformAction(UltraGridAction.EnterEditMode, False, False)  '<<<<<<<
                e.Handled = True
            End If
        End If

    End Sub

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

760 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

24 Experts available now in Live!

Get 1:1 Help Now