Solved

Infragistics ultragrid controls

Posted on 2004-03-25
5
4,821 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Magic Software info 18 132
Non-recursive backtracking, using a stack 1 137
detecting  the added row index in a datagridview 3 71
Turning python script into an applet 12 111
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

832 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