jbhtgh
asked on
Infragistics dialog control not displaying when looping thru an excel spreadsheet
I am opening an excel worksheet and looping thru the rows,
based on values in certain cells, I would like the infragistics web dialog to display in a modal state, allow the app to gather information in the dialog, then save that information, make the dialog non modal and hide it, then continue scrolling thru the spreadsheet.
The problem is that the dialog will not display, and I just continue rolling thru the spreadsheet
The code I'm using follows
'Item Record Information
Dim lRow As Long
Dim iCol As Integer
Dim iInterfaceRecordID As Integer
Dim iInterfaceFileRecordID As Integer
Dim sSegSeq As String
Dim sItemSequence As String
Dim sItemDescription As String
Dim sDataType As String
Dim sMaxLength As String
Dim sName As String
Dim sItemComments As String
'' Dim sCurrentRecSeq As String
For iCol = 9 To xlWorkSheet.Rows(1).cells. Count ' Col 9 is where the list of receiving applications starts
If Trim(xlWorkSheet.Rows(1).C ells(iCol) .text) <> vbNullString Then ' Do nothing if no receiving application.
Session("currrentrecseq") = xlWorkSheet.Rows(2).Cells( 2).text ' Row 2 is where data starts, row 1 is header
For lRow = 2 To xlWorkSheet.Rows.Count ' read the worksheet row by row
If Session("currrentrecseq") <> xlWorkSheet.Rows(lRow).Cel ls(2).text .trim Then ' Compare the values, if different enter if block
' write interface file item record record
Session("currrentrecseq") = xlWorkSheet.Rows(lRow).Cel ls(2).text .trim ' reset the sequence
wDialogRecord.Visible = True ' set dialog to visible
wDialogRecord.Modal = True ' set dialog to Modal, also set in properties
wDialogRecord.WindowState = Infragistics.Web.UI.Layout Controls.D ialogWindo wState.Nor mal ' set window state to normal so it will show
' when dialog shows, user fills out information and hits save button, which set dialog visible property to false, modal to false, and dialog window state to hidden
End If
If Trim(xlWorkSheet.Rows(lRow ).Cells(1) .text) = vbNullString Then Exit For ' Jump loop on Blank, END
If xlWorkSheet.Rows(lRow).Cel ls(iCol).t ext = "X" Then ' If this column has an "X", then we need to save this record
If xlWorkSheet.Rows(lRow).Cel ls(1).text <> vbNullString Then ' to account for a skipped row, or invalid data
iInterfaceRecordID = xlWorkSheet.Rows(lRow).Cel ls(1).text ' read values from spreadsheet
sSegSeq = xlWorkSheet.Rows(lRow).Cel ls(2).text
sItemSequence = xlWorkSheet.Rows(lRow).Cel ls(3).text
sItemDescription = xlWorkSheet.Rows(lRow).Cel ls(4).text
sDataType = xlWorkSheet.Rows(lRow).Cel ls(5).text
sMaxLength = xlWorkSheet.Rows(lRow).Cel ls(6).text
sName = xlWorkSheet.Rows(lRow).Cel ls(7).text
sItemComments = xlWorkSheet.Rows(lRow).Cel ls(8).text
' Write the Interface File Record Item
SaveInterfaceFileRecordIte m(Int(wNum InterfaceI D.Value), Int(wNumRecordID.Value), sItemSequence, sItemDescription, sDataType, sMaxLength, sName, 999, sItemComments)
End If
End If
Next
End If
Next
xlWorkBook.Close()
Is this too much to ask from this dialog control. I have a open support incident when them and they have said the code looks like it should work, but haven't given me an answer why not.
based on values in certain cells, I would like the infragistics web dialog to display in a modal state, allow the app to gather information in the dialog, then save that information, make the dialog non modal and hide it, then continue scrolling thru the spreadsheet.
The problem is that the dialog will not display, and I just continue rolling thru the spreadsheet
The code I'm using follows
'Item Record Information
Dim lRow As Long
Dim iCol As Integer
Dim iInterfaceRecordID As Integer
Dim iInterfaceFileRecordID As Integer
Dim sSegSeq As String
Dim sItemSequence As String
Dim sItemDescription As String
Dim sDataType As String
Dim sMaxLength As String
Dim sName As String
Dim sItemComments As String
'' Dim sCurrentRecSeq As String
For iCol = 9 To xlWorkSheet.Rows(1).cells.
If Trim(xlWorkSheet.Rows(1).C
Session("currrentrecseq") = xlWorkSheet.Rows(2).Cells(
For lRow = 2 To xlWorkSheet.Rows.Count ' read the worksheet row by row
If Session("currrentrecseq") <> xlWorkSheet.Rows(lRow).Cel
' write interface file item record record
Session("currrentrecseq") = xlWorkSheet.Rows(lRow).Cel
wDialogRecord.Visible = True ' set dialog to visible
wDialogRecord.Modal = True ' set dialog to Modal, also set in properties
wDialogRecord.WindowState = Infragistics.Web.UI.Layout
' when dialog shows, user fills out information and hits save button, which set dialog visible property to false, modal to false, and dialog window state to hidden
End If
If Trim(xlWorkSheet.Rows(lRow
If xlWorkSheet.Rows(lRow).Cel
If xlWorkSheet.Rows(lRow).Cel
iInterfaceRecordID = xlWorkSheet.Rows(lRow).Cel
sSegSeq = xlWorkSheet.Rows(lRow).Cel
sItemSequence = xlWorkSheet.Rows(lRow).Cel
sItemDescription = xlWorkSheet.Rows(lRow).Cel
sDataType = xlWorkSheet.Rows(lRow).Cel
sMaxLength = xlWorkSheet.Rows(lRow).Cel
sName = xlWorkSheet.Rows(lRow).Cel
sItemComments = xlWorkSheet.Rows(lRow).Cel
' Write the Interface File Record Item
SaveInterfaceFileRecordIte
End If
End If
Next
End If
Next
xlWorkBook.Close()
Is this too much to ask from this dialog control. I have a open support incident when them and they have said the code looks like it should work, but haven't given me an answer why not.
ASKER
derftov,
thanks for the help, but in version 9.2 this control doesn't have a show method.
thanks for the help, but in version 9.2 this control doesn't have a show method.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No, the dialog is just on the form.
What I've noticed today is that after I loop thru the entire spreadsheet, and there is no code executing, the dialog will appear.
it's sort of like that it doesn't have time to display when I'm reading the spreadsheet
But needless to say, that isn't acceptable.
thanks,
What I've noticed today is that after I loop thru the entire spreadsheet, and there is no code executing, the dialog will appear.
it's sort of like that it doesn't have time to display when I'm reading the spreadsheet
But needless to say, that isn't acceptable.
thanks,
In winforms applications, we use Application.DoEvents function so that the application processes all its win messages (which include the updating of UI). In ASP.NET, this is not available. The problem i think is that the dialog is only displayed once the function completes executing and sends data back to the client.
ASKER
I think you nailed it codecruiser.
Excel makes no difference, I ge the same results when I try to do the same thing reading an array.
It is an extremely slow dialog to display also. if i just put the code to display it behind a button it takes 3 seconds.
I am working with Infragsitics support but they have been no help.
Excel makes no difference, I ge the same results when I try to do the same thing reading an array.
It is an extremely slow dialog to display also. if i just put the code to display it behind a button it takes 3 seconds.
I am working with Infragsitics support but they have been no help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
While I'm waiting to see what infragistics pulls out their butt, I am rearchitecting the application so I won't need the dialog.
Much heavier, but it's gotta work.
thanks
Much heavier, but it's gotta work.
thanks
ASKER
The real answer seems to be that you can't do it. I awarded points on the effort.
thanks,
thanks,
You have to call the show method for the dialog to show up.