Solved

Passing Argument using RadWindow

Posted on 2009-03-29
3
5,495 Views
Last Modified: 2012-05-06
I am struggling on the best method for passing an arguemnet to a RadWindow.  I want to get the stocknumber form the databinder .eval expression to the rad window.  Any help is appreciated.
<script type="text/javascript">

    //Function to open Rad window with button

    function ShowDialog(StockNumber) 

    {
 

        var oWnd = window.radopen(null, "radWindow1");

        oWnd.setUrl(oWnd.get_navigateUrl());
 

    }
 
 

    </script>

<body>

 <telerik:radwindowmanager runat="server" Animation="FlyIn" 

        ID="radWindowManager" Skin="Vista" Height="325px" Width="625px" 

        Left="250px" OffsetElementID="btnInstant" Title="Instant Quote Request" 

        Top="150px" onclientshow="onClientShow" KeepInScreenBounds="True" >

    

         <Windows>

        <telerik:radwindow runat="server" 

        ID="radWindow1" 

        NavigateUrl="webforms/InstantQuoteWindow.aspx" 

         >

        </telerik:radwindow>

        </Windows> 

    </telerik:radwindowmanager>
 

<asp:Button ID="btnInstant" runat="server" Text="Click for Too Low to Publish $" Visible='<%# System.Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "InstantQuote").Equals(1)?"True":"False") %>'   OnClientClick="javascript:ShowDialog('<%# DataBinder.Eval(Container.DataItem, "StockNumber") %>');" /><br />

</body>

Open in new window

0
Comment
Question by:spradsrv
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
carlnorrbom earned 500 total points
Comment Utility
Hi,

I don't have access to my dev environment but will give this a go anyway, have you tried changing the javascript function to:

    function ShowDialog(StockNumber)
    {
 
        var oWnd = window.radopen(null, "radWindow1");
        oWnd.setUrl(oWnd.get_navigateUrl() + "?StockNumber=" + StockNumber);
 
    }

And then in Your "InstantQuoteWindow.aspx" window's page load eventhandler do request for the stock number?

Page_Load:

If Not String.IsNullOrEmpty(Request("StockNumber") Then
    Dim StockNumber As Integer = Convert.ToInteger32(Request("StockNumber"))
    'Other logic to build the page...
End If

Just an idea.

/Carl.
0
 
LVL 18

Expert Comment

by:carlnorrbom
Comment Utility
Hi,

Did this solve Your problem?

/Carl.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now