Hello Team,
We are using Infragistics 8.3 and MS VS 2008. In the infragistics win grid we want to find the particular value of a particular column and set the entrie row to selected.
Is there any way to find the value in the grid and set the row as selected. The value which we are searching is an unique one and we would be searching it in a single column.
Thanks in advance.
aftercellupdate didnt work, had to use the BeginInvoke to call the Method.
Thanks
Showing a MessageBox during AfterEnterEditMode could certainly cause a problem. I'd recommend trying this in AfterCellUpdate, instead.
If that doesn't help, then you probably need to institute some sort of delay before displaying the MessageBox. Try taking the code out of the event handler and put it into a separate method. Then, in the event handler, use a BeginInvoke to call the method. That should create enough of a delay for the grid to finish whatever processing it is doing before it tries to enter edit mode on the new cell.
the function is being called from AfterExitMode of the grid, the function is used to check if any duplicat item is found in the column, if its found then it should select that cell and EnterEditMode.
This sounds like a timing problem, but it's not clear to me what you are actually doing here. From what event is this code being called? What is the user doing to trigger it?
tried it , didnt work.
after i hit ok on the message box, the keyboard cursor goes on the next column of the last row.
here's my code
Private Function CheckItemInGrid(ByVal Item As String) As Boolean Dim CheckValue As String
For i As Integer = 0 To (grdInvoice.Rows.Count) - 2 CheckValue = grdInvoice.Rows(i).Cells(0).Value.ToString
If CheckValue = Item Then grdInvoice.Rows(i).Cells(0).Selected = True MsgBox("Item Already Exists")
'grdInvoice.ActiveRow.Delete(False) grdInvoice.ActiveRow = grdInvoice.Rows(i) grdInvoice.ActiveCell = grdInvoice.ActiveRow.Cells(0) 'grdInvoice.PerformAction(EnterEditMode, False, False)
Return True
Exit For Exit Function End If Next
Return False End Function