Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
can't close the valuelist in the cell of a UltraGrid
posted

Hi,

I have scenario where I'm displaying a valuelist (as a dropdownlist) in the cell of the UltraGrid. The valuelist has some values and when user selects any value I show him a message box to confirm. Once the user confirms by pressing OK the Valuelist doesn't close. I'm attaching the code. So could you please let me know how do I close the Valulist. 

Private Sub ugEMwithP2_ValueListClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles ugEMwithP2.CellListSelect

Dim l_objDataMgr As New DWSDataManager.DataManager
Dim l_intDeedsAppIdNo As Integer = ugEMwithP2.ActiveRow.Cells("id").Value
Dim l_intCertIdNo As Integer = ugEMwithP2.ActiveRow.Cells("cert_idno").Value
Dim l_intAssignToValue As Integer = CType(ugEMwithP2.ActiveRow.Cells("Assign To").ValueListResolved, Infragistics.Win.ValueList).SelectedItem.DataValue
Dim l_intAssignToText As String = CType(ugEMwithP2.ActiveRow.Cells("Assign To").ValueListResolved, Infragistics.Win.ValueList).SelectedItem.DisplayText

If e.Cell.Column.Header.Caption = "Assign To" Then
If MsgBox("Are you sure you want to assign this item from the work list to " & l_intAssignToText & " ?", MsgBoxStyle.YesNo, "Assign this item From Worklist?") = MsgBoxResult.Yes Then
l_objDataMgr.EMwithP2AssignUsers(1, l_intDeedsAppIdNo, l_intCertIdNo, l_intAssignToValue)
Exit Sub
End If
End If

End Sub

Parents
  • 21795
    Offline posted

    Hello Vikas,

    Following the steps you provided and using the code from your code snippet, I was unable to reproduce this issue. I created a small sample project and handled CellListSelect event of the grid. I put the same code as you did in my event handler. The only difference, as I had no access to DWSDataManager, I commented out these two rows:

    Dim l_objDataMgr As New DWSDataManager.DataManager
    l_objDataMgr.EMwithP2AssignUsers(1, l_intDeedsAppIdNo, l_intCertIdNo, l_intAssignToValue)

    When I run my sample, drop down the value list, click on any item and click Ok on the message box the drop down closes. Attached is my sample for you reference.

    Can you try to comment the above mentioned rows in your application and let me know if you still face the same issue?

    Additionally you may try to call PerformAction over the grid and pass CloseDropdown as paremeter like this:

    If MsgBox("Are you sure you want to assign this item from the work list to " & l_intAssignToText & " ?", MsgBoxStyle.YesNo, "Assign this item From Worklist?") = MsgBoxResult.Yes Then
        l_objDataMgr.EMwithP2AssignUsers(1, l_intDeedsAppIdNo, l_intCertIdNo, l_intAssignToValue)
        Me.ugEMwithP2.PerformAction(UltraGridAction.CloseDropdown)
        Exit Sub
    End If

    Looking forward to your reply.

    UltraGridDropDownIssue.zip
Reply Children