RadWindow & RadGrid Issue

4 posts, 1 answers
  1. L
    L avatar
    295 posts
    Member since:
    Apr 2008

    Posted 18 Aug 2011 Link to this post

    hi

    I have a Radgrid and a Radwindow. The radwindows is suppose to popup whenever one click view detail link in the radgrid. Well, it worked, but the funny part was that whenever i click the page in the radgrid, the windows popup itself.  Why is that happening. Thanks and sorry if any inconvenience caused.

    Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
            Dim windowManager As New RadWindowManager()
            Dim window1 As New RadWindow()

            If e.CommandName = "Select" Then
                Dim selectedRow As GridDataItem = DirectCast(e.Item, GridDataItem)
                Session("custid") = selectedRow.GetDataKeyValue("custid")
                window1.Width = "800"
                window1.Height = "520"
                window1.VisibleTitlebar = "false"
                window1.VisibleStatusbar = "false"
                window1.NavigateUrl = "~/custinfo.aspx?custid=" & Session("custid").ToString
                window1.ID = "RadWindow1"
                window1.VisibleOnPageLoad = True
                window1.ReloadOnShow = "true"
                ' Set this property to True for showing window from code   
                RadWindowManager1.Windows.Add(window1)
                'Page.Form.Controls.Add(widnow1)
    End Sub

  2. Answer
    Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 18 Aug 2011 Link to this post

    I'm no expert but you might try testing for an actual data row with

    If TypeOf e.Item Is GridDataItem Then

      If e.CommandName = "Select" Then .....

    Andy
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. L
    L avatar
    295 posts
    Member since:
    Apr 2008

    Posted 18 Aug 2011 Link to this post

    hi

    It is not about the data,anyway the actual data value is correct.

  5. L
    L avatar
    295 posts
    Member since:
    Apr 2008

    Posted 18 Aug 2011 Link to this post

    hi

    I know the cause. thanks
Back to Top