I have an issue with the dock command.Name="close".
If the user clicks the close button quickly on multiple docks, it will not have enough time to finish the process before skiping on over to the next dock. How can I prevent the user from clicking the close button or make the sub finish on process before starting another.
Thank you
Bobby
If the user clicks the close button quickly on multiple docks, it will not have enough time to finish the process before skiping on over to the next dock. How can I prevent the user from clicking the close button or make the sub finish on process before starting another.
Thank you
Bobby
Sub dock_Command(ByVal sender As Object, ByVal e As DockCommandEventArgs) | |
If e.Command.Name = "ExpandCollapse" Then | |
'Update record in database if dock is collapsed | |
UpdateRec((DirectCast(sender, RadDock)).Title, (DirectCast(sender,RadDock)).DockZoneID, (DirectCast(sender, RadDock)).Collapsed.ToString) | |
End If | |
If e.Command.Name = "Close" Then | |
Dim DelDock As String = (DirectCast(sender, RadDock)).Title | |
DeleteRec(Profile.UserName, DelDock.ToString) | |
Dim i As Integer | |
For i = 0 To Me.combolist.Items.Count - 1 | |
If combolist.Items(i).Text = DelDock.ToString Then | |
combolist.Items(i).Enabled = True | |
Dim j As Integer | |
For j = 0 To arr.Count - 1 | |
If arr(j).ToString = combolist.Items(i).Value.ToString Then | |
' Label1.Text += arr(j).ToString | |
arr.RemoveAt(j) | |
Exit For | |
End If | |
Next | |
Exit For | |
End If | |
Next | |
Dim z As Integer | |
If (DirectCast(sender, RadDock)).DockZoneID = "RadDockZone1" Then | |
'Reorder docks Index for DockZone 1 after deletion | |
For z = 0 To Me.RadDockZone1.Docks.Count - 1 | |
UpdateIndex(Me.RadDockZone1.Docks(z).Title, "RadDockZone1", z.ToString) | |
Next | |
Else | |
'Reorder docks Index for DockZone 2 after deletion | |
For z = 0 To Me.RadDockZone2.Docks.Count - 1 | |
UpdateIndex(Me.RadDockZone2.Docks(z).Title, "RadDockZone2", z.ToString) | |
Next | |
End If | |
ScriptManager.RegisterStartupScript(UpdatePanel1, Me.[GetType](), "RemoveDock", String.Format("function _removeDock() {{" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "Sys.Application.remove_load(_removeDock);" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "$find('{0}').undock();" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "$get('{1}').appendChild($get('{0}'));" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "$find('{0}').doPostBack('DockPositionChanged');" & Chr(13) & "" & Chr(10) & "}};" & Chr(13) & "" & Chr(10) & "Sys.Application.add_load(_removeDock);", (DirectCast(sender, RadDock)).ClientID, UpdatePanel1.ClientID), True) | |
End If | |
End Sub |