This is a migrated thread and some comments may be shown as answers.

Item command click shows all modal popups

2 Answers 165 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 09 Oct 2013, 07:05 PM

the problem is this, I added update panel to my page and even tried the RadAjax panel as well and both had the same trouble.  The site works fine without the ajax, but as soon as I ajaxify and then click on one of my link buttons on the radgrid it pulls up all the modalpopup windows on the page and I do mean all of them.  I went back and checked the modal opoups to make sure its calling the correct panels and buttons and each have there own, and like I said it calls only 1 when the page has no update panels.  The following is the code of the radgrid.

The first one is a command item button that I am calling and the second sits on the datarow to add notes.  I check all code behind and the only places I am calling the show is in this ItemCommand event.  It makes no sense that the page works perfectly fine without ajax panels but when I put them in no matter which item command I call i shows both modal pop-ups.  I would switch to Radwindow  but there is data being saved via the pop-ups.

Protected Sub myradgrid_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles myradgrid.ItemCommand
       If (e.CommandName = "Tran") Then     (this is a command item template button)
           Dim IssueIDs As String = ""
           For Each item As GridDataItem In myradgrid.Items
               Dim cb As CheckBox = item.FindControl("cbTransfer")
               Dim IssueId As String = item.GetDataKeyValue("intIssuedID").ToString
               If cb.Checked = True Then
                   IssueIDs += IssueId & ","
               End If
           Next
 
           'Check to see if they checked anything
           If IssueIDs = Nothing Then
               ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "OpenWindow", "noCheckbox();", True)
           Else
               'Get the Issued Ids remove end comma to put in variable
               IssueIDs = IssueIDs.Remove(IssueIDs.Length - 1, 1)
               HFIssuedId.Value = IssueIDs
               FindEquip(IssueIDs)
           End If
       End If
 
       If (e.CommandName = "EditNotes") Then  ( this is a row link button  in radgrid)
           Dim Id As Integer = e.CommandArgument
 
           HFNotesID.Value = Id
 
           If CheckAdmin() = True Then
               GetNotes()
           End If
           pnlNotes_MPE.Show()
       End If
 
       If e.CommandName = "ExportToExcel" Then
           IsExport = True
           myradgrid.Columns(0).Visible = False
           myradgrid.Columns(3).Visible = False
           myradgrid.MasterTableView.GetColumn("NOTES").Visible = True
           myradgrid.ExportSettings.FileName = Replace(HFDigSig.Value, "'", "''") & "-iPBRHR"
       End If
   End Sub

This is the fillEquip of the 1st Item command that calls the popup.

'get the items that where transferred to another user.
   Private Sub FindEquip(ByVal EquipId As String)
       
       sql = "statement"
     
       myRadItems.DataSource = getReader(sql)
       myRadItems.DataBind()
 
       pnlpop_MPE.Show()
   End Sub





































2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 15 Oct 2013, 12:40 AM
Hi,

Can you provide the aspx declaration, so we can get better understanding of your scenario? Once we
have all the needed information we will be able to test the code locally and try to replicate the describe problem.

Thank you.

Regards,
Pavlina
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Kevin
Top achievements
Rank 1
answered on 15 Oct 2013, 12:42 PM
HI, I figured it out last week, thanks
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or