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

Pass label text as parameter to radopen

1 Answer 96 Views
Window
This is a migrated thread and some comments may be shown as answers.
RealDeal
Top achievements
Rank 1
RealDeal asked on 29 Aug 2012, 08:59 PM
Let me see if I can explain this....

Using a MasterPage...

I have a RadGridView with ViewEditForm. When the form opens I have a RadButton that when pressed should open a RadWindow to display a page of additional details related to the main record.I need to be able to pass a parameter in so that the value can be added to the querystring of the URL. I have a hardcoded version of it working but I need to know how I can grab the parameter off of the ViewEditForm or from the grid row. The value is available from the text of a label (Label1) within the form where the button resides. This is the hardcoded version that works - I need to replace the 9953 in the onClientClicked portion with the dynamically retrieved value.

The aspx page:

 

<telerik:RadButton ID="btnTitleDetails" runat="server"
EnableEmbeddedSkins="False" Skin="Metro_BLT" Text="Title Details"
onClientClicked="function(sender, args){openRadWin(sender, args, '9953');}"
AutoPostBack="false" />

 

The Javascript from the masterpage: 

<script type="text/javascript">
  function openRadWin(sender, args, propId) {
    var url = location.href;
    var baseURL = url.substring(0, url.indexOf('/', 14));
    radopen(baseURL + "/TitleDetail.aspx?&propid=" + propId, "RadWindow1");
    }                                                                      
</script>

1 Answer, 1 is accepted

Sort by
0
RealDeal
Top achievements
Rank 1
answered on 30 Aug 2012, 03:47 AM
Nevermind - I changed up how I was doing this and got it working.
Tags
Window
Asked by
RealDeal
Top achievements
Rank 1
Answers by
RealDeal
Top achievements
Rank 1
Share this question
or