?
Solved

Infragistics ultragrid controls

Posted on 2004-03-25
5
Medium Priority
?
4,930 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
[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
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 100 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 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…

762 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