Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Infragistics ultragrid controls

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Progress
Introduction to Processes

636 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