Solved

Infragistics ultragrid controls

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
countHi challenge 25 98
array6 challenfge 6 81
White board coding practice 3 78
cmd.exe will not close when running .bat file to perform FTP upload 18 94
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A short article about problems I had with the new location API and permissions in Marshmallow
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 fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

911 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

16 Experts available now in Live!

Get 1:1 Help Now